On Wed, Jun 15, 2022 at 10:44:28AM -0000, Mathew Elman wrote:
Could this be the behaviour of passing in an Ellipsis? e.g.
def foo(defaults_to_one=1): return defaults_to_one
assert foo(...) == foo()
It isn't clear to me whether your question is a request for clarification (does the PEP mean this...?) or a request for a change in behaviour (could you change the PEP to do this...?). Why would you want to type `foo(...)` when you could just type `foo()`?
The only place that I am aware of the Ellipsis being used is in index notation (numpy). So this would have likely an impact on __getitem__ or the slice object.
Ellipsis has been around for over twenty years so we have to assume it would have an impact on thousands of programs. We don't just care about famous, popular libraries like numpy, we care about breaking little scripts used by one person too. -- Steve