module documentation
(source)

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 ​Async​Generator​Model Undocumented
Class ​Bound​Method​Model Undocumented
Class ​Class​Model No class docstring; 1/10 property, 0/1 instance variable, 0/1 method documented
Class ​Dict​Model No class docstring; 0/4 property, 1/1 method documented
Class ​Exception​Instance​Model Undocumented
Class ​Function​Model Undocumented
Class ​Generator​Model Undocumented
Class ​Import​Error​Instance​Model Undocumented
Class ​Instance​Model Undocumented
Class ​Module​Model Undocumented
Class ​Object​Model No class docstring; 0/1 instance variable, 2/7 methods documented
Class ​OSError​Instance​Model Undocumented
Class ​Property​Model Model for a builtin property
Class ​Super​Model Undocumented
Class ​Syntax​Error​Instance​Model Undocumented
Class ​Unbound​Method​Model Undocumented
Class ​Unicode​Decode​Error​Instance​Model Undocumented
Constant BUILTIN​_EXCEPTIONS Undocumented
Constant IMPL​_PREFIX Undocumented
Variable objects Undocumented
Function _dunder​_dict Undocumented
BUILTIN_EXCEPTIONS = (source)

Undocumented

Value
{'builtins.SyntaxError': SyntaxErrorInstanceModel,
 'builtins.ImportError': ImportErrorInstanceModel,
 'builtins.UnicodeDecodeError': UnicodeDecodeErrorInstanceModel,
 'builtins.OSError': OSErrorInstanceModel,
 'builtins.BlockingIOError': OSErrorInstanceModel,
 'builtins.BrokenPipeError': OSErrorInstanceModel,
 'builtins.ChildProcessError': OSErrorInstanceModel,
...
IMPL_PREFIX: str = (source)

Undocumented

Value
'attr_'
objects = (source)

Undocumented

def _dunder_dict(instance, attributes): (source)

Undocumented