Skip to content

hololinked.core.meta.Propertized

Bases: Parameterized

Bae class providing additional functionality related to properties, like setting up a registry, allowing values to be set at __init__() etc. It is not meant to be subclassed directly by the end-user.

UML Diagram

Source code in hololinked\core\meta.py
class Propertized(Parameterized):
    """
    Bae class providing additional functionality related to properties,
    like setting up a registry, allowing values to be set at `__init__()` etc. 
    It is not meant to be subclassed directly by the end-user.

    [UML Diagram](http://localhost:8000/UML/PDF/Thing.pdf)
    """

    # There is a word called Property+ize in english dictionary
    # https://en.wiktionary.org/wiki/propertization

    id : str

    # creating name without underscore causes clash with the metaclass method 
    # with same name
    def create_param_container(self, **params):
        self._properties_registry = PropertiesRegistry(self.__class__, None, self)
        self._properties_registry._setup_parameters(**params)
        self._param_container = self._properties_registry # backwards compatibility with param

    @property
    def properties(self) -> PropertiesRegistry:
        """container for the property descriptors of the object."""
        return self._properties_registry

Attributes

properties property

properties: PropertiesRegistry

container for the property descriptors of the object.