Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(697)

Unified Diff: src/org/python/core/PyMethod.java

Issue 2888: __findattr__ refactor (Closed) Base URL: https://jython.svn.sourceforge.net/svnroot/jython/branches/asm
Patch Set: This is the actually commited patch (on r5155), in case you have more comments Created 15 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/org/python/core/PyLongDerived.java ('k') | src/org/python/core/PyModule.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/org/python/core/PyMethod.java
===================================================================
--- src/org/python/core/PyMethod.java (revisiĆ³n: 5153)
+++ src/org/python/core/PyMethod.java (copia de trabajo)
@@ -55,13 +55,27 @@
}
@Override
- public PyObject __findattr__(String name) {
- PyObject ret = super.__findattr__(name);
+ public PyObject __findattr_ex__(String name) {
+ return instancemethod___findattr_ex__(name);
+ }
+
+ final PyObject instancemethod___findattr_ex__(String name) {
+ PyObject ret = super.__findattr_ex__(name);
if (ret != null) {
return ret;
}
- return im_func.__findattr__(name);
+ return im_func.__findattr_ex__(name);
}
+
+ @ExposedMethod
+ final PyObject instancemethod___getattribute__(PyObject arg0) {
+ String name = asName(arg0);
+ PyObject ret = instancemethod___findattr_ex__(name);
+ if (ret == null) {
+ noAttributeError(name);
+ }
+ return ret;
+ }
@Override
public PyObject __get__(PyObject obj, PyObject type) {
« no previous file with comments | « src/org/python/core/PyLongDerived.java ('k') | src/org/python/core/PyModule.java » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b