On 8/24/07, Guido van Rossum <[EMAIL PROTECTED]> wrote: > On 8/24/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > Guido> Are there any existing uses (in the core) that are hard to > > Guido> replace with PyArg_ParseTuple()? > > > > There are lots of uses where the arguments aren't tuples. I was > > particularly vexed by the time module because it was used to extract > > arguments both from tuples and from time.struct_time objects.
There are 45 uses in */*.c spread across 9 modules: arraymodule.c, posixmodule.c, _hashopenssl.c (2), dbmmodule.c (4), gdbmmodule.c (2), mactoolboxglue.c (5), stringobject.c (2) with Python/mactoolboxglue.c looking like it's low hanging fruit, and stringobject.c will hopefully go away. Some of the others don't look bad. The bulk of the uses are in array and posixmodules. I'm not sure if those are easy to change. The remaining 65 uses are in Mac modules. I'm not sure if all of them are sticking around. (That's a separate discussion we should have--which of the mac modules should go.) > > I suspect most of the low-hanging fruit (PyArg_Parse used to parse tuples) > > has already been plucked. I think this is mostly true, but there are still some that are low-hanging. Maybe just kill the low hanging fruit for now. > Then I don't think it's a priority to try to get rid of it, and maybe > it should just stay. I agree it's not the biggest priority, but it would be nice if it was done. There's still over 500 uses of PyString which is higher priority, but also probably harder in many cases. n _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
