Hacking Around Enumeration

Mark Geyzer Mark Geyzer
Language: English
video in English
The presentation was given on 2019.06.02 at PyCon Israel 2019.

Extendable and easy-to-use lightweight enumeration alternative.

Presentation of usage of enumeration implementation by wrapping collections.namedtuple . Demonstrate advantages of proposal versus standard enum APIs: * Less verbose * Compatible with built-in types * Collect constant objects - e.g., string literals - into a single container * As above - with conversion, e.g. - to pathlib.path * Simple processing of nested JSONs - one-stop JSON object creation * One-stop loader for configuration files * Automatic generation of sequences - e.g., KB, MB, GB, ...