nip.utils.oop.classproperty

nip.utils.oop.classproperty#

class nip.utils.oop.classproperty(property_method)[source]#

A decorator to create a class property.

This is a class property that can be accessed on the class itself, rather than on an instance of the class.

Example

>>> class MyClass:
>>>     @classproperty
>>>     def my_property(cls):
>>>         return "my_property"
Parameters:

property_method (Callable) – The function to use as the class property.

Methods Summary

__get__(obj, owner)

__init__(property_method)

Methods

__get__(obj, owner)[source]#
__init__(property_method)[source]#