[Python-ideas] Spelling of Assignment Expressions PEP 572 (was post #4)

Guido van Rossum guido at python.org
Tue Apr 17 00:59:31 EDT 2018


On Mon, Apr 16, 2018 at 8:09 PM, Thautwarm Zhao <yaoxiansamma at gmail.com>
wrote:
>
>  > 3) "target ? expr" (where ? is some other word/character -  IIRC
>  >  "target from expr" was proposed once)
>
> A more popular convention is to mark `?` as handling boolean variables, so
> `target ? expr` could mean `expr if target else target`. Other proposal for
> null/boolean checking might need `?`, let's preserve `?` character for
> further development.
>

The only acceptable use of ? is formulated in PEP 505.

-- 
--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180416/e130e4ec/attachment.html>


More information about the Python-ideas mailing list