[Python-Dev] Re: Optimizing literal comparisons and contains

2021年11月29日 04:39:02 -0800

Hi,
I am surprised by the insistence on this thread for excluding comparisons from 
constant folding.
Why should we special case comparisons? Am I missing something here?
We already constant fold a variety of expressions
0 * 7
'' * 7
True - True
True * False
(All the above are falsey)
Excluding 1 < 2 seems inconsistent.
Cheers,
Mark.
_______________________________________________
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/BRQHDHZKNIMMXCA5SSAW2N3D57V2ZDZJ/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to