lisa.wlgen.rta.AndProperty#
- class lisa.wlgen.rta.AndProperty[source]#
Bases:
PropertyBase
Semigroup property with the
&
operation.Classes
__class__
inheritedMetaclass for properties.
Attributes
Subclasses can override this attribute so that
PropertyBase.from_key()
knows that it can call their_from_key()
method for that key.Properties
Methods
Combine values of the properties using
_SEMIGROUP_OP()
, except when one of the value isNone
, in which case the other value is used as is and wrapped into an instance usingfrom_key()
.HASH_COERCE()
inheritedUsed to coerce the values of
self.__dict__
to hashable values.find_cls()
inheritedFind which subclass can handle
key
.from_key()
inheritedAlternative constructor that is available with the same signature for all properties.
Classes#
- AndProperty.__class__#
alias of
PropertyMeta
Attributes#
- AndProperty.KEY = None#
Subclasses can override this attribute so that
PropertyBase.from_key()
knows that it can call their_from_key()
method for that key.Note
This class attribute will not be inherited automatically so that each class can be uniquely identified by its key. Subclass that do not override the value explicitly will get
None
.
Properties#
- property AndProperty.key#
Inherited property, see
lisa.wlgen.rta.PropertyBase.key
Key of the instance.
- abstract property AndProperty.val#
Inherited property, see
lisa.wlgen.rta.PropertyBase.val
Value “payload” of the property.
Methods#
- AndProperty.__and__(other)#
Combine values of the properties using
_SEMIGROUP_OP()
, except when one of the value isNone
, in which case the other value is used as is and wrapped into an instance usingfrom_key()
.
- AndProperty.HASH_COERCE(x, coerce)#
Inherited method, see
lisa.utils.SimpleHash.HASH_COERCE()
Used to coerce the values of
self.__dict__
to hashable values.
- classmethod AndProperty.find_cls(key)#
Inherited method, see
lisa.wlgen.rta.PropertyBase.find_cls()
Find which subclass can handle
key
.
- classmethod AndProperty.from_key(key, val)#
Inherited method, see
lisa.wlgen.rta.PropertyBase.from_key()
Alternative constructor that is available with the same signature for all properties.