On 2021-11-29 00:52, Christopher Barker wrote:
I will frequently do simple computation with literals to make my code
more clear:
t = 2 * 3600 # 2 hours in seconds
But I see no need to optimize this kind of thing -- it would never be in
a tight loop.
The suggestion was specifically about optimising comparison of literals
such as 1 < 2, which is not done at present, and the objection is
basically YAGNI - that kind of thing is just too rare to be worth it.
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at
https://mail.python.org/archives/list/python-dev@python.org/message/2VS4ZPFYAYVOG4BBHRWAFIEH7CU62X4B/
Code of Conduct: http://python.org/psf/codeofconduct/