decorators

Full name: ase2sprkkr.common.decorators

Module class hierarchy

Inheritance diagram of ase2sprkkr.common.decorators.cached_class_property, ase2sprkkr.common.decorators.class_property

Description

Various decorators, mainly for class methods

Module Attributes

cache(user_function, /)

Simple lightweight unbounded cache.

cached_property(func)

Functions

add_called_class_as_argument(decorator)

If a decorator is used on a method, the information about the defining class is lost.

add_to_signature(func[, prepend, self_name])

Add the arguments in the func function to the list of arguments of the resulting function (as keyword_only arguments) The modified function has to have its arguments defined as in the following example:

Classes

cached_class_property([method])

Decorator that converts a method with a single cls argument into a property that can be accessed directly from the class.

class_property([method])

Decorator that converts a method with a single cls argument into a property that can be accessed directly from the class.