Message221531
> 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. |
|
Date |
User |
Action |
Args |
2014-06-25 07:17:15 | larry | set | recipients:
+ larry, rhettinger, terry.reedy, belopolsky, ezio.melotti, python-dev, serhiy.storchaka, vajrasky |
2014-06-25 07:17:15 | larry | set | messageid: <1403680635.53.0.475447728443.issue19145@psf.upfronthosting.co.za> |
2014-06-25 07:17:15 | larry | link | issue19145 messages |
2014-06-25 07:17:15 | larry | create | |
|