Super¶
- class astroid.objects.Super(mro_pointer: SuccessfulInferenceResult, mro_type: SuccessfulInferenceResult, self_class: scoped_nodes.ClassDef, scope: scoped_nodes.FunctionDef, call: node_classes.Call)[source]¶
Bases:
NodeNGProxy class over a super call.
This class offers almost the same behaviour as Python’s super, which is MRO lookups for retrieving attributes from the parents.
The mro_pointer is the place in the MRO from where we should start looking, not counting it. mro_type is the object which provides the MRO, it can be both a type or an instance. self_class is the class where the super call is, while scope is the function where the super call is.
- getattr(name, context: InferenceContext | None = None)[source]¶
- igetattr(name: str, context: InferenceContext | None = None) Iterator[InferenceResult][source]¶
Retrieve the inferred values of the given attribute name.
- property name¶
Get the name of the MRO pointer.
- special_attributes¶