On Wed, Nov 3, 2021, 2:40 PM MRAB <[email protected]> wrote:
> 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? > I'm sure I could get used to it, but that looks to me like you're unpacking an empty list and assigning the resulting tuple. It's weird.
_______________________________________________ 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/5IQURP77KMIZOCNU7PDNFOKAHGJCZ7LP/ Code of Conduct: http://python.org/psf/codeofconduct/
