On 2021年11月29日 00:52, Christopher Barker wrote:
I will frequently do simple computation with literals to make my code more clear: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.t = 2 * 3600 # 2 hours in secondsBut I see no need to optimize this kind of thing -- it would never be in a tight loop.
_______________________________________________ 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/2VS4ZPFYAYVOG4BBHRWAFIEH7CU62X4B/ Code of Conduct: http://python.org/psf/codeofconduct/