[Python-ideas] PEP 505 (None coalescing operators) thoughts
Alexander Belopolsky
alexander.belopolsky at gmail.com
Wed Sep 30 02:27:22 CEST 2015
On Tue, Sep 29, 2015 at 8:24 PM, Alexander Belopolsky <
alexander.belopolsky at gmail.com> wrote:
> ... suggest repurposing the rarely used xor operator: ^ and make x ^ y
> return the non-None of x and y or None if both are None.
.. and x if both are not None to allow x ^= y to work as expected.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150929/9d9db94d/attachment.html>
More information about the Python-ideas
mailing list