touketsu.core.identity_nondynamic

@touketsu.core.identity_nondynamic

Makes a class nondynamic without modifying the class docstring.

Caution

Since identity_nondynamic() does not modify the docstring of the class it decorates, it is easy to mistake the decorated class for the undecorated class.

Note

Do not apply to a previously decorated class. Instead, use urt_class() first to return the class to its original state before applying identity_nondynamic().

Parameters

cls (type) – The class to decorate.

Returns

A decorated version of the original class with immutable instances.

Return type

type