[Python-ideas] Inplace assignment for "boolean or"?

Cammil Taank ctaank at gmail.com
Sun Mar 25 05:23:15 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/20180325/fbb6e796/attachment.html>

More information about the Python-ideas mailing list