touketsu.core.identity_immutable

@touketsu.core.identity_immutable

Makes a class immutable without modifying the class docstring.

Caution

Since identity_immutable() 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_immutable().

Parameters

cls (type) – The class to decorate.

Returns

A decorated version of the original class with immutable instances.

Return type

type