Python Metaclass : Understanding the ‘with_metaclass()’
with_metaclass() is a utility class factory function provided by the six library to make it easier to develop code for both Python 2 and 3. It uses a little sleight of hand (see below) with a temporary metaclass, to attach a metaclass to a regular class in a way that’s cross-compatible with both Python 2 … Read more