On 2021-11-03 18:14, Ethan Furman wrote:
On 11/3/21 10:35 AM, Steven D'Aprano wrote:
> I suppose that we could even add yet another overloaded meaning on the
> asterix:
>
> # with no default, * keeps the old meaning of collecting
> # extra positional values
>
> *parameter
>
> # with a default, * triggers late-binding
>
> *parameter=expression
>
> I should hate that, I know I should... but I kinda don't.
Don't worry, I do. ;-)
How about:
parameter=*expression
so, for example:
parameter=*[]
indicates that you get a new list for each default, so multiple lists,
not a single shared list?
_______________________________________________
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/7L4DYTUTQYP4A6OIHN45IKVZOTXUBZPM/
Code of Conduct: http://python.org/psf/codeofconduct/