Hacker News new | ask | show | jobs
by masklinn 2156 days 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.