Message221531
| Author |
larry |
| Recipients |
belopolsky, ezio.melotti, larry, python-dev, rhettinger, serhiy.storchaka, terry.reedy, vajrasky |
| Date |
2014年06月25日.07:17:15 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1403680635.53.0.475447728443.issue19145@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
> 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. |
|