On 14/01/21 3:32 pm, Terry Reedy wrote:
I say 'yes', because the purpose of logging is to document what happens, and if nothing happens, there is nothing to document. Wrapping a .__bool__ in a logging decorator might be part of testing it.
Or it might be something else. It would be fine to *define* __bool__ as something the compiler is allowed to optimise away. But that's a different thing from "purity" (which is hard to pin down in an imperative language). -- Greg _______________________________________________ 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/FKQSB6SVOAO2Y3BOQSXSHEN5LM2KBETR/ Code of Conduct: http://python.org/psf/codeofconduct/