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

Mikhail V mikhailwas at gmail.com
Tue Apr 17 03:11:04 EDT 2018


On Tue, Apr 17, 2018 at 6:09 AM, 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.

Hey!  I did not propose "?". Read the explanation in parenthesis.
My whole idea that any option could be viable, as long as
it does not propose reversed order notation.

But anyway ":=" is better than any keyword imo.


Mikhail


More information about the Python-ideas mailing list