3 ms·
> But there’s no expanding happening here? There's a collection of 0 arguments. the "∗" was introduced specifically as a shortcut for: def foo(a, *ignore,
by masklinn 6y ago
> But there’s no expanding happening here?
There's a collection of 0 arguments. the "∗" was introduced specifically as a shortcut for:
def foo(a, *ignore, b):
if ignore:
raise TypeError
forgoing the name simply signals to the language that it should collect nothing.
It's a logical extension of the assumption that anything which follows `∗arg` is a keyword-only parameter.