[Python-Dev] assignment expressions: an alternative proposal (original) (raw)
Yury Selivanov yselivanov.ml at gmail.com
Tue Apr 24 11:05:57 EDT 2018
- Previous message (by thread): [Python-Dev] assignment expressions: an alternative proposal
- Next message (by thread): [Python-Dev] assignment expressions: an alternative proposal
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Tue, Apr 24, 2018 at 10:54 AM, Anthony Flury via Python-Dev <python-dev at python.org> wrote: [..]
As discussed previously by others on this exact proposals, you now have the issue of confusion when using keyword arguments : myfunc(a = b) : clearly that is a call to `myfunc' where argument a has the value of b, but if you want to do an assigment expression when calling the function you now have to do myfunc((a=b)) - which frankly looks messy in my opinion; you get the same issue when you are wanting to do assignment expressions in tuples.
Well, my_func(a=(b:=foo))
or my_func(b:=foo)
are also barely
readable to my eye. My expectation is that users won't use any form
of assignment expressions in function calls, it's painful with both
proposals.
Yury
- Previous message (by thread): [Python-Dev] assignment expressions: an alternative proposal
- Next message (by thread): [Python-Dev] assignment expressions: an alternative proposal
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]