On Sat, Jan 24, 2015 at 4: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
Look at it this way: A classic enumeration has no use-case for equal-but-distinct; this thread doesn't disagree with that, because this thread is not about classic enumerations. In the same way, integers don't have use-cases for equal-but-distinct either, but in practice, you can distinguish between exact literals and the results of computation: rosuav@sikorsky:~$ cat unique_numbers.py x = 100000 y = 100000 z = 99999+1 print(x is y, x is z, y is z) rosuav@sikorsky:~$ python3 unique_numbers.py True False False This is still not good code, though. If you really need to distinguish those, your code is majorly fragile. ChrisA -- https://mail.python.org/mailman/listinfo/python-list