Data object model, as per https://docs.python.org/3/reference/datamodel.html.
This module describes, at least partially, a data object model for some of astroid's nodes. The model contains special attributes that nodes such as functions, classes, modules etc have, such as __doc__, __class__, __module__ etc, being used when doing attribute lookups over nodes.
For instance, inferring obj.__class__
will first trigger an inference
of the obj
variable. If it was successfully inferred, then an attribute
__class__ will be looked for in the inferred object. This is the part
where the data model occurs. The model is attached to those nodes
and the lookup mechanism will try to see if attributes such as
`__class__
are defined by the model or not. If they are defined,
the model will be requested to return the corresponding value of that
attribute. Thus the model can be viewed as a special part of the lookup
mechanism.
Class | AsyncGeneratorModel |
Undocumented |
Class | BoundMethodModel |
Undocumented |
Class | ClassModel |
No class docstring; 1/10 property, 0/1 instance variable, 0/1 method documented |
Class | DictModel |
No class docstring; 0/4 property, 1/1 method documented |
Class | ExceptionInstanceModel |
Undocumented |
Class | FunctionModel |
Undocumented |
Class | GeneratorModel |
Undocumented |
Class | ImportErrorInstanceModel |
Undocumented |
Class | InstanceModel |
Undocumented |
Class | ModuleModel |
Undocumented |
Class | ObjectModel |
No class docstring; 0/1 instance variable, 2/7 methods documented |
Class | OSErrorInstanceModel |
Undocumented |
Class | PropertyModel |
Model for a builtin property |
Class | SuperModel |
Undocumented |
Class | SyntaxErrorInstanceModel |
Undocumented |
Class | UnboundMethodModel |
Undocumented |
Class | UnicodeDecodeErrorInstanceModel |
Undocumented |
Constant | BUILTIN_EXCEPTIONS |
Undocumented |
Constant | IMPL_PREFIX |
Undocumented |
Variable | objects |
Undocumented |
Function | _dunder_dict |
Undocumented |
Undocumented
Value |
|