1
0
forked from VimPlug/jedi

__getattr__ comment.

This commit is contained in:
Dave Halter
2015-05-06 19:56:00 +02:00
parent 2221f12de9
commit 0543586abd

View File

@@ -203,10 +203,13 @@ class NameFinder(object):
with common.ignored(KeyError):
result = inst.execute_subscope_by_name('__getattr__', name)
if not result:
# this is a little bit special. `__getattribute__` is executed
# before anything else. But: I know no use case, where this
# could be practical and the jedi would return wrong types. If
# you ever have something, let me know!
# This is a little bit special. `__getattribute__` is in Python
# executed before `__getattr__`. But: I know no use case, where
# this could be practical and where jedi would return wrong types.
# 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):
result = inst.execute_subscope_by_name('__getattribute__', name)
return result