On Tue, Feb 10, 2015 at 1:33 AM, Paul Moore <p.f.moore at gmail.com> wrote: > On 10 February 2015 at 00:29, Neil Girdhar <mistersheik at gmail.com> wrote: > >> > function(**kw_arguments, **more_arguments) > >> If the key "key1" is in both dictionaries, more_arguments wins, right? > > > > > > There was some debate and it was decided that duplicate keyword arguments > > would remain an error (for now at least). If you want to merge the > > dictionaries with overriding, then you can still do: > > > > function(**{**kw_arguments, **more_arguments}) > > > > because **-unpacking in dicts overrides as you guessed. > > Eww. Seriously, function(**{**kw_arguments, **more_arguments}) feels > more like a Perl "executable line noise" construct than anything I'd > ever want to see in Python. And taking something that doesn't work and > saying you can make it work by wrapping **{...} round it just seems > wrong. > +1 to this and similar reasoning I find the syntax proposed in PEP 448 incredibly obtuse, and I don't think it's worth it. Python has never placed terseness of expression as its primary goal, but this is mainly what the PEP is aiming at. -1 on the PEP for me, at least in its current form. Eli -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20150210/15db81eb/attachment.html>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4