Re: [Python-3000] Removal of PyArg_Parse()

2007-08-25 Thread Gregory P. Smith
On Fri, Aug 24, 2007 at 08:30:48PM -0700, Neal Norwitz wrote: > 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_

Re: [Python-3000] Removal of PyArg_Parse()

2007-08-25 Thread skip
Neal> with Python/mactoolboxglue.c looking like it's low hanging fruit, I already took care of the easy cases there, though I haven't checked it in yet. Neal> The remaining 65 uses are in Mac modules. I'm not sure if all of Neal> them are sticking around. (That's a separate discuss

Re: [Python-3000] Removal of PyArg_Parse()

2007-08-25 Thread skip
Martin> As for the case of timemodule: the surprising feature is that Martin> "(ii)" uses PySequence_Getitem to access the fields, whereas Martin> PyArg_ParseTuple uses PyTuple_GET_ITEM, so it won't work for Martin> StructSequences. I believe I've already fixed this (r57416) by in

Re: [Python-3000] Removal of PyArg_Parse()

2007-08-24 Thread Martin v. Löwis
> Then I don't think it's a priority to try to get rid of it, and maybe > it should just stay. I think it would be desirable to get rid of METH_OLDARGS. Ideally, this should already be possible, as all modules should have been changed to be explicit about their usage of METH_OLDARGS (rather than r

Re: [Python-3000] Removal of PyArg_Parse()

2007-08-24 Thread Neal Norwitz
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

Re: [Python-3000] Removal of PyArg_Parse()

2007-08-24 Thread Greg Ewing
Guido van Rossum wrote: > Then I don't think it's a priority to try to get rid of it, and maybe > it should just stay. Maybe it should be renamed to reflect the fact that it's now general-purpose and no longer used at all for argument parsing? Perhaps PyObject_Parse? -- Greg _

Re: [Python-3000] Removal of PyArg_Parse()

2007-08-24 Thread Guido van Rossum
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 wa

Re: [Python-3000] Removal of PyArg_Parse()

2007-08-24 Thread skip
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_t

Re: [Python-3000] Removal of PyArg_Parse()

2007-08-24 Thread Guido van Rossum
I think that's a question for Martin von Loewis. Are there any existing uses (in the core) that are hard to replace with PyArg_ParseTuple()? On 8/24/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > skip> I started in looking at removing PyArg_Parse. > > Before I go any farther, perhaps I s

Re: [Python-3000] Removal of PyArg_Parse()

2007-08-24 Thread skip
skip> I started in looking at removing PyArg_Parse. Before I go any farther, perhaps I should ask: Is PyArg_Parse going away or just its use as the argument parser for METH_OLDARGS functions? Skip ___ Python-3000 mailing list Python-3000@python.

[Python-3000] Removal of PyArg_Parse()

2007-08-24 Thread skip
I started in looking at removing PyArg_Parse. The first module I tackled was the time module. That was harder than I thought it would be (PyArg_Parse is only called from one place), in large part I think because it can take a number of different types of arguments. Is there some recommended way