class_property

class ase2sprkkr.common.decorators.class_property(method=None)[source]

Decorator that converts a method with a single cls argument into a property that can be accessed directly from the class. The value is not cached, see cached_class_property(), if caching is desirable.

Example

class Cls:
   @class_property
   def cls_property():
       return some_value

   x = Cls.cls_property

Class hierarchy

Inheritance diagram of ase2sprkkr.common.decorators.class_property

Constructor

__init__(method=None)[source]