class LazyMembers: (source)
Known subclasses: pytype.abstract._classes.PyTDClass
, pytype.abstract._instances.LazyConcreteDict
, pytype.abstract._instances.Module
Use lazy loading for the attributes of the represented value. A class that mixes in LazyMembers must: * pass init_mixin a dict of the raw attribute values. This will be stored as the `_member_map` attribute. * Define a `members` attribute to be a name->attribute dictionary. * Implement a `_convert_member` method that processes a raw attribute into an abstract value to store in `members`. When accessing an attribute on a lazy value, the caller must first call `load_lazy_attribute(name)` to ensure the attribute is loaded. Calling `_convert_member` directly should be avoided! Doing so will create multiple copies of the same attribute, leading to subtle bugs.
Method | init |
Undocumented |
Method | load |
Load the named attribute into self.members. |
Class Variable | members |
Undocumented |
Method | _convert |
Undocumented |
Instance Variable | _member |
Undocumented |
pytype.abstract._classes.PyTDClass
, pytype.abstract._instances.LazyConcreteDict
, pytype.abstract._instances.Module
Undocumented