
On Wed, Nov 3, 2021, 2:40 PM MRAB <python@mrabarnett.plus.com> wrote:
On 11/3/21 10:35 AM, Steven D'Aprano wrote:
I suppose that we could even add yet another overloaded meaning on
On 2021-11-03 18:14, Ethan Furman wrote: 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.