[Python-ideas] Optional parameters without default value
Victor Stinner
victor.stinner at gmail.com
Fri Mar 3 08:06:56 EST 2017
2017-03-03 6:13 GMT+01:00 Mike Miller <python-ideas at mgmiller.net>:
> Agreed, I've rarely found a need for a "second None" or sentinel either, but
> once every few years I do. So, this use case doesn't seem to be common
> enough to devote special syntax or a keyword to from my perspective.
The question here is how to have an official support of this feature
in inspect.signature().
If we go to the special value (singleton) way, Ellispis doesn't work
neither since a few modules use Ellipsis for legit use case. Recent
user: the typing module for "Callable[[arg, ...], result]".
Victor
More information about the Python-ideas
mailing list