forked from VimPlug/jedi
__getattr__ comment.
This commit is contained in:
@@ -203,10 +203,13 @@ class NameFinder(object):
|
|||||||
with common.ignored(KeyError):
|
with common.ignored(KeyError):
|
||||||
result = inst.execute_subscope_by_name('__getattr__', name)
|
result = inst.execute_subscope_by_name('__getattr__', name)
|
||||||
if not result:
|
if not result:
|
||||||
# this is a little bit special. `__getattribute__` is executed
|
# This is a little bit special. `__getattribute__` is in Python
|
||||||
# before anything else. But: I know no use case, where this
|
# executed before `__getattr__`. But: I know no use case, where
|
||||||
# could be practical and the jedi would return wrong types. If
|
# this could be practical and where jedi would return wrong types.
|
||||||
# you ever have something, let me know!
|
# If you ever find something, let me know!
|
||||||
|
# We are inversing this, because a hand-crafted `__getattribute__`
|
||||||
|
# could still call another hand-crafted `__getattr__`, but not the
|
||||||
|
# other way around.
|
||||||
with common.ignored(KeyError):
|
with common.ignored(KeyError):
|
||||||
result = inst.execute_subscope_by_name('__getattribute__', name)
|
result = inst.execute_subscope_by_name('__getattribute__', name)
|
||||||
return result
|
return result
|
||||||
|
|||||||
Reference in New Issue
Block a user