Python to Rust: Enum
Enums are new with Python 3.4 and PEP 435, but have been backported. At first, I saw more trouble than benefit from Python Enums. They are typically used for type safety, and this isn’t really enforceable in Python. But, since they are a class, you can add additional functionality to them. This gives them more usefulness than I previously thought. It isn’t easy to store data with them in most languages.