Skip to main content

getitem_property

Attribute - > dict key descriptor.

Attributes

AttributeTypeDescription
keystringThe final key in the keypath used to access or set the value in the target dictionary-like object.
pathlist of strings or nullA list of intermediate keys representing the nested path to the dictionary containing the target attribute, or None if the attribute is at the root level.
docstring or nullThe documentation string for the property, which can be optionally provided during initialization.

Constructor

Signature

def getitem_property(
keypath: str,
doc: str = None
)

Parameters

NameTypeDescription
keypathstrA string representing the path to the dictionary key, using dots to separate nested levels.
docstr = NoneAn optional documentation string for the descriptor.