Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
intro/magic: OrderedEnum is obsolete #305
Starting from 3.7, dicts will be guaranteed to be ordered. They're also ordered in CPython 3.6 (and PyPy, and there aren't other relevant 3.6 implementations). So, ordering will now come for free.
3.5 compat is still important, but it doesn't make a good example.
We mentioned those facts when explaining the thing. But yes, we might need a better example.
Idea: The real
class FooEnum(Enum): a = 1 a = 2
We might show that as an example. I.e. subclass a dict and prevent item reassignment in