API Reference

This page lists the main touketsu components. Please refer to the User Guide for usage details.

Below we list the main decorators that will be accessed by users.

immutable(cls)

Makes a class immutable and modifies the class docstring.

identity_immutable(cls)

Makes a class immutable without modifying the class docstring.

nondynamic(cls)

Makes a class nondynamic and modifies the class docstring.

identity_nondynamic(cls)

Makes a class nondynamic without modifying the class docstring.

These are produced by the factory method class_decorator_factory() listed below.

class_decorator_factory([dectype, docmod])

touketsu class decorator factory.

The class decorator urt_class() undos the effect of an applied class decorator, returning the class back to its original undecorated state. If applied to a non-decorated class, it returns the class itself.

urt_class(cls)

Remove the touketsu restriction from a touketsu decorated class.

The orig_init() can be used to gain access to a class’s original undecorated __init__() function, which is necessary when subclassing a decorated class.

orig_init(init)

Return original __init__() from decorated __init__().

The decorator urt_method() temporarily removes a touketsu restriction from a class instance during the instance method’s execution.

urt_method(meth)

Decorate instance methods to temporarily allow attribute creation.