On Fri, Jan 23, 2015 at 10:45 AM, Rustom Mody <rustompm...@gmail.com> wrote: > No disagreement with the 'hack' > As for "no use case for equal but distinct tokens" - thats a strange > view given this thread
If you want equal but distinct, you can give them distinct values and define an __eq__ method that compares them as equal. Because of this though I do take some issue with the Planet example in the docs: https://docs.python.org/3/library/enum.html#planet If any planets happened to have the same mass and radius (which I realize would be unlikely in this case), the example would fail. Using the value of the enum for both identity and data conflates the two concepts and leads to pitfalls. -- https://mail.python.org/mailman/listinfo/python-list