.. title:: OrProperty lisa.wlgen.rta.OrProperty ========================= .. autoclass:: lisa.wlgen.rta::OrProperty :no-members: :no-inherited-members: :no-undoc-members: :no-private-members: :no-special-members: .. rubric:: Classes .. list-table:: :align: left * - :class:`~lisa.wlgen.rta.PropertyBase.__class__` :sup:`inherited` - .. withrefctx:: :module: lisa.wlgen.rta :class: lisa.wlgen.rta.PropertyBase.__class__ Metaclass for properties. .. rubric:: Attributes .. list-table:: :align: left * - :attr:`~lisa.wlgen.rta.OrProperty.KEY` - .. withrefctx:: :module: lisa.wlgen.rta :class: lisa.wlgen.rta.PropertyBase Subclasses can override this attribute so that :meth:`PropertyBase.from_key` knows that it can call their :meth:`~PropertyBase._from_key` method for that key. .. rubric:: Properties .. list-table:: :align: left * - :attr:`~lisa.wlgen.rta.PropertyBase.key` :sup:`inherited` - .. withrefctx:: :module: lisa.wlgen.rta :class: lisa.wlgen.rta.PropertyBase Key of the instance. * - :attr:`~lisa.wlgen.rta.PropertyBase.val` :sup:`inherited` - .. withrefctx:: :module: lisa.wlgen.rta :class: lisa.wlgen.rta.PropertyBase Value "payload" of the property. .. rubric:: Methods .. list-table:: :align: left * - :meth:`~lisa.wlgen.rta.OrProperty.__and__` - .. withrefctx:: :module: lisa.wlgen.rta :class: lisa.wlgen.rta._SemigroupProperty Combine values of the properties using :meth:`~_SEMIGROUP_OP`, except when one of the value is ``None``, in which case the other value is used as is and wrapped into an instance using :meth:`~PropertyBase.from_key`. * - :meth:`~lisa.utils.SimpleHash.HASH_COERCE` :sup:`inherited` - .. withrefctx:: :module: lisa.utils :class: lisa.utils.SimpleHash Used to coerce the values of ``self.__dict__`` to hashable values. * - :meth:`~lisa.wlgen.rta.PropertyBase.find_cls` :sup:`inherited` - .. withrefctx:: :module: lisa.wlgen.rta :class: lisa.wlgen.rta.PropertyBase Find which subclass can handle ``key``. * - :meth:`~lisa.wlgen.rta.PropertyBase.from_key` :sup:`inherited` - .. withrefctx:: :module: lisa.wlgen.rta :class: lisa.wlgen.rta.PropertyBase Alternative constructor that is available with the same signature for all properties. Classes ------- .. autoclass:: lisa.wlgen.rta::OrProperty.__class__ Attributes ---------- .. autoattribute:: lisa.wlgen.rta::OrProperty.KEY Properties ---------- .. autoproperty:: lisa.wlgen.rta::OrProperty.key .. autoproperty:: lisa.wlgen.rta::OrProperty.val Methods ------- .. automethod:: lisa.wlgen.rta::OrProperty.__and__ .. automethod:: lisa.wlgen.rta::OrProperty.HASH_COERCE .. automethod:: lisa.wlgen.rta::OrProperty.find_cls .. automethod:: lisa.wlgen.rta::OrProperty.from_key