Contains logic for retrieving special methods.
This implementation does not rely on the dot attribute access logic, found in .getattr(). The difference between these two is that the dunder methods are looked with the type slots (you can find more about these here http://lucumr.pocoo.org/2014/8/16/the-python-i-would-like-to-see/) As such, the lookup for the special methods is actually simpler than the dot attribute access.
Function | lookup |
Lookup the given special method name in the given node |
Function | _builtin_lookup |
Undocumented |
Function | _class_lookup |
Undocumented |
Function | _lookup_in_mro |
Undocumented |
Lookup the given special method name in the given node
If the special method was found, then a list of attributes
will be returned. Otherwise, astroid.AttributeInferenceError
is going to be raised.