On 02/12/2020 10:00 AM, Andrew Barnert wrote:
On Feb 12, 2020, at 06:49, Ethan Furman <et...@stoneleaf.us> wrote:
On 02/11/2020 01:49 PM, Steven D'Aprano wrote:
Oh, definitely for the best. This now allows us to write complex
assertions much more easily and efficiently:
assert log(flag := complex_expression) or flag
That doesn't seem very useful: for that assert to fail, `flag` would have to be
falsey, and if falsey, then surely the log of it is not helpful?
You’ve never had some rare code path that’s missing a return, and wasted half
an hour trying to figure out how you could possibly be getting 0 out of that
calculation before realizing you’re actually getting None?
*sheepish grin*
Point taken.
--
~Ethan~
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/python-ideas@python.org/message/5UA4E5Q4CVPP3K5AA6DU53TA3QTODXC5/
Code of Conduct: http://python.org/psf/codeofconduct/