Will we be able to splat/unpack the `?`?
>>> args = get_starting_list_values()
>>> args
(1, 2, 3)
>>> dd = defaultdict([*?])
>>> dd["spam"]
[1, 2, 3]
or:
>>> kwargs = get_kwargs()
>>> kwargs
{'x': 1, 'y' 2, 'z': 3}
>>> dd = defaultdict(Node(**?))
>>> dd["eggs"]
Node(x=1, y=2, z=3)
---
Ricky.
"I've never met a Kentucky man who wasn't either thinking about going home
or actually going home." - Happy Chandler
On Wed, Sep 29, 2021 at 9:03 AM Chris Angelico <[email protected]> wrote:
> On Wed, Sep 29, 2021 at 10:56 PM Dominik Vilsmeier
> <[email protected]> wrote:
> > members.sort(key=(?[1], ?[0]))
>
> How do you know whether this is one function that returns a tuple, or
> a tuple of two functions?
>
> ChrisA
> _______________________________________________
> Python-ideas mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
> https://mail.python.org/mailman3/lists/python-ideas.python.org/
> Message archived at
> https://mail.python.org/archives/list/[email protected]/message/LFSBND3PDEM7XFZD3E73MILTDTT4HPQJ/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/NKUDQMUBOT43SPBQ6LN3G47WN5PBXSMG/
Code of Conduct: http://python.org/psf/codeofconduct/