module documentation

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; 2/11 properties, 0/1 instance variable, 0/1 method documented
Class ContextManagerModel Model for context managers.
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; 2/2 properties, 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
Constant LEN_OF_IMPL_PREFIX Undocumented
Variable builder Undocumented
Variable objects Undocumented
Function _dunder_dict Undocumented
Function _get_bound_node 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_'
LEN_OF_IMPL_PREFIX = (source)

Undocumented

Value
len(IMPL_PREFIX)

Undocumented

Undocumented

def _dunder_dict(instance, attributes): (source)

Undocumented

def _get_bound_node(model: ObjectModel) -> Any: (source)

Undocumented