On 5/20/2020 9:48 AM, Peter O'Connor wrote:
On Wed, May 20, 2020 at 5:35 AM Eric V. Smith <e...@trueblade.com
<mailto:e...@trueblade.com>> wrote:
On 5/20/2020 8:23 AM, James Lu wrote:
> What's wrong with my := proposal?
Confusion with unrelated uses of the walrus operator.
What's wrong with confusion with the walrus operator?
- If you are confused and don't know what walrus operator is, you
google it and find that in a function header it means late assignment.
- If you are confused and think it's referring to the walrus
operator's use for inline variable assignment - well so what - it is
being used as assignment here!
- If you are confused and think := is binding at import-time rather
than call-time - well you already are a somewhat advanced python user
to be thinking about that and the use of a different syntax to bind
the argument should trigger you to google it.
I think every proposal, especially for syntax and operators, should be
judged on how confusing it is to new and experienced users alike. In my
mind, using the walrus operator for early binding utterly fails that
test, but of course other people will have different opinions.
The fact that operators are notoriously difficult to search for doesn't
help any.
Eric
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/python-ideas@python.org/message/6SWOR62ONDY5EZ3J5MJDWQHCTVQ3G5PN/
Code of Conduct: http://python.org/psf/codeofconduct/