Steven D'Aprano <steve+pyt...@pearwood.info> added the comment:

Oops sorry I got the operator precedence wrong:

    if (profile := users.get(uid, None)) is not None:

The walrus operator was added in Python 3.8. Using the "as" key word was 
considered and rejected. See the PEP:

https://www.python.org/dev/peps/pep-0572/

https://docs.python.org/3/reference/expressions.html#assignment-expressions


I don't want to discourage you, but the process to get new syntax added to the 
library is:

* discuss it on Python-Ideas mailing list, to see if there is community support 
for it;

* if there is community support, as for a core developer to sponsor the idea;

* if you get a sponsor, write a PEP

* hopefully the Steering Council will accept it;

* and somebody (perhaps you, perhaps somebody else) will make the changes to 
the language.


https://mail.python.org/archives/list/python-id...@python.org/

https://www.python.org/dev/peps/

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42954>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to