class documentation
class ContextManagerModel(ObjectModel): (source)
Known subclasses: astroid.interpreter.objectmodel.GeneratorModel
Model for context managers. Based on 3.3.9 of the Data Model documentation: https://docs.python.org/3/reference/datamodel.html#with-statement-context-managers
Property | attr |
Representation of the base implementation of __enter__. |
Property | attr |
Representation of the base implementation of __exit__. |
Inherited from ObjectModel
:
Method | __call__ |
Undocumented |
Method | __contains__ |
Undocumented |
Method | __get__ |
Undocumented |
Method | __init__ |
Undocumented |
Method | __repr__ |
Undocumented |
Method | attributes |
Get the attributes which are exported by this object model. |
Method | lookup |
Look up the given *name* in the current model. |
Property | attr |
Calling cls.__init__() normally returns None. |
Property | attr |
Calling cls.__new__(type) on an object returns an instance of 'type'. |
Instance Variable | _instance |
Undocumented |
Representation of the base implementation of __enter__. As per Python documentation: Enter the runtime context related to this object. The with statement will bind this method's return value to the target(s) specified in the as clause of the statement, if any.