Python infrastructure for the Mathematical Logic through Programming book.
A class decorator that disallows assignment to instance variables after construction.
A method decorator for parameterless methods of immutable classes that memoizes the return value to avoid recalculation.
Callable[[~T], ~S]) – method to modify.
- Return type
The given method, modified so that after its first execution, its functionality is replaced with simply returning the value calculated by its first execution. If the value calculated by the given method has a
()method, then instead of returning this value, each execution of the returned method, including the first one, makes a fresh call to this
()method and returns the result.
An immutable variant of the built-in