builtins#
property#
from toolbox.builtins import property
- class classproperty[source]#
Decorator to set a class method as a class property.
Combines a property and a classmethod into one, creating a class property. Allows access to computed class attributes.
Example
from toolbox.builtins.property import classproperty class Animal: @classproperty def dog(cls): return "whoof!" print(Animal.dog) # >>> 'whoof!'