On Sat, Oct 31, 2020 at 8:46 PM Stephen J. Turnbull <
turnbull.stephen...@u.tsukuba.ac.jp> wrote:

> Steven D'Aprano writes:
>
>  >     {'spam': spam, 'eggs', eggs, **who_cares} = mapping
>
> Shouldn't that be
>
>     {'spam': spam, 'eggs', eggs, **_} = mapping
>
> 8-D
>
> Actually, I kinda like that, it looks like the side-eye emoji!  Or a
> flounder, but that's a different kettle of fish.
>

Hm, for PEP 622/634 we looked at this and ended up making it so that this
is the default -- you only have to write
```
{'spam': spam, 'eggs': eggs} = mapping
```
and any extra keys are ignored. This is because for the common use case
here we want to ignore extra keys, not insist there aren't any. (We wrote
it up a little better in the Mapping Patterns section of PEP 635.)

-- 
--Guido van Rossum (python.org/~guido)
*Pronouns: he/him **(why is my pronoun here?)*
<http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/>
_______________________________________________
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/6NSB52VZOKHT7HMAWYUYJSQRQKYBUXBY/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to