> > I understand it locks in that particular implementation detail, but it > also seems unlikely that that particular optimization (int 0 and int 1 as > specific memory objects) would ever make sense to NOT be including in a > shipping implementation (future proof by practicality). >
Do you explicitly want to differentiate between *CPython integer* 0's and 1's and floats? How about Numpy and other numeric libraries? assert 0.0 is not 0 assert 1.0 is not 1 assert numpy.ones(1, dtype=int)[0] is not 1 assert numpy.int8(1) is not 1 I think you're going to cause sneaky bugs for yourself.
_______________________________________________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/HLXJHCBM27BWZFWWZRBRBLO2EFYOK7EJ/ Code of Conduct: http://python.org/psf/codeofconduct/
