Larry Hastings added the comment:

> There is a way using *args and **kwds but that isn't any fun

That's why, earlier, I said a "sensible" signature.  Every function *could* get 
the signature "(*args, **kwargs)" but this imparts no useful semantic 
information.


> What I would like to see in the future is better support
> for optional arguments in PyArg_ParseTupleAndKeyword

It sounds to me like you're proposing adding "nullable int" support to 
PyArg_ParseTuple*.  I'm not going to; I see Argument Clinic as the way forward, 
and I'm adding it there instead.

In general I'd rather see work go into AC than into PyArg_ParseTuple*.  I think 
PyArg_ParseTuple* is already too complicated, and using AC gives the function a 
signature for free.  My hope is to increase the value proposition of AC so much 
that everyone agrees with me and we deprecate (but don't remove!) 
PyArg_ParseTuple*. :D


> changing repeat() in way that no one currently needs smacks of having
> the tail wag the dog

I concede that nobody (probably) needs a workable default value for the times 
argument.  But I suggest that giving functions sensible signatures is a worthy 
goal in its own right, and that the "times=None" semantics will get us there in 
a reasonable, backwards-compatible way.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue19145>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to