norming
Introduction

This project allows for creating norming classes.

Installation
Features
class Norming(*args, **kwargs)

The instances of this class are designed as decorators which in turn create new classes from functions. These new classes are created with the *args and **kwargs from the construction of the Norming decorator. The __new__ functions within the new classes pass their parameters to the function that was originally decorated. The resulting return is in turn passed to the parental __new__ function. This setup is particularly useful for creating children of immutable classes with restricted freedom, e.g. named tuples of two integer values.

__call__(norm: Callable) -> type

This magic method implements the calling of the current instance. It is designed to function as a decorator for a function.

Testing
License
Impressum