From 0543586abdb82aaa07d42dc38f57320ecaea6f2c Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Wed, 6 May 2015 19:56:00 +0200 Subject: [PATCH] __getattr__ comment. --- jedi/evaluate/finder.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/jedi/evaluate/finder.py b/jedi/evaluate/finder.py index c112f971..c066a92e 100644 --- a/jedi/evaluate/finder.py +++ b/jedi/evaluate/finder.py @@ -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