}
public PyObject __findattr__(String name) {
PyType self_type = getType();
PyObject getattribute = self_type.lookup("__getattribute__");
PyString py_name = null;
try {
if (getattribute != null) {
return getattribute.__get__(this, self_type).__call__(py_name = new PyString(name));
} else {
return super.__findattr__(name);
}
} catch (PyException e) {
if (Py.matchException(e, Py.AttributeError)) {
PyObject getattr = self_type.lookup("__getattr__");
if (getattr != null)
try {
return getattr.__get__(this, self_type)
.__call__(py_name != null ? py_name : new PyString(name));
} catch (PyException e1) {
if (!Py.matchException(e1, Py.AttributeError))
throw e1;
}
return null;