diff options
author | Claudiu Popa <cpopa@cloudbasesolutions.com> | 2015-05-06 22:20:36 +0300 |
---|---|---|
committer | Claudiu Popa <cpopa@cloudbasesolutions.com> | 2015-05-06 22:20:36 +0300 |
commit | 13612ce973ff653718187bfed5edcaf9701a7fab (patch) | |
tree | 4d0d4edd0b2ed725fa39815985009c41798b0295 | |
parent | 78912e72327dccd06e3566594ee98bee9802bd80 (diff) | |
download | astroid-13612ce973ff653718187bfed5edcaf9701a7fab.tar.gz |
Update the docstring for has_dynamic_getattr to better reflect reality.
-rw-r--r-- | astroid/scoped_nodes.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/astroid/scoped_nodes.py b/astroid/scoped_nodes.py index f919d04..5021786 100644 --- a/astroid/scoped_nodes.py +++ b/astroid/scoped_nodes.py @@ -1266,8 +1266,13 @@ class Class(Statement, LocalsDictNodeNG, FilterStmtsMixin): raise InferenceError(name) def has_dynamic_getattr(self, context=None): - """return True if the class has a custom __getattr__ or - __getattribute__ method + """ + Check if the current instance has a custom __getattr__ + or a custom __getattribute__. + + If any such method is found and it is not from + builtins, nor from an extension module, then the function + will return True. """ try: self.getattr('__getattr__', context) |