_containers
Full documentation pages are generated for docstring reference only and may contain symbols imported from other modules. Imported symbols are not distinguished from locally defined symbols and will appear in any module that they are imported into. For better information on where symbols should be imported from, review the sourcecode on the github.
FoSpy.blocks._containers
SimpleWrapper
Wrapper for attaching methods and attributes to simple data types that don't
support it. Most method or attribute calls are passed through to the wrapped
value, but some methods or private attributes are attached when setting a
SimpleWrapper as attribute for a SingleBlock or ListBlock.
Source code in FoSpy/blocks/_containers.py
__call__
__eq__
__float__
__getattr__
__getitem__
__init__
__int__
__iter__
__repr__
__setitem__
SubContainer
A simple container for storing hidden or unexpected attributes of a
SingleBlock
Values are only assigned directly to SingleBlock attributes if they are an
expected property. Otherwise they are assigned to a SubContainer at
SingleBlock.ext. Also used for SingleBlock._meta.
Example Usage:
class SingleBlock:
...
def __setattr__(self, name, value):
...
if name not in expected:
return setattr(self.ext, name, value)