[Python-ideas] In-place assignment for "boolean or"?

Cammil Taank ctaank at gmail.com
Mon Mar 26 08:48:34 EDT 2018


I find a common idiom in Python is:

x = x or 'some other value'

This is highly reminiscent of the problem inplace operators solve.

Would it be a good idea to consider an inplace operator for this, perhaps:

x or= 'some other value'



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180326/20a2c489/attachment.html>

More information about the Python-ideas mailing list