[Python-Dev] Built-in functions, kw args

Guido van Rossum guido@python.org
Sat, 21 Sep 2002 07:37:47 -0400


> It looks like the usage of ParseTuple vs ParseTupleAndKeywords is
> just whatever the author felt like using at the time (to me,
> anyway).

Almost.  Historically, ParseTupleAndKeywords didn't exist for many
years.  Also, it's much more painful to use.  And it's slower.  It's
likely that the few occurrences you found were almost all the new
class constructors, which pretty much require it.

> For the sake of consistency at least (and convenience to boot),
> might it be nice to use PyArg_ParseTupleAndKeywords in more places
> -- I hesitate to say everywhere, but at least in the places it makes
> sense?  Is there a reason not to do this?  Would a patch be accepted
> that made it so?

It would be a *humungous* patch, and it would take forever to verify
that it was 100% correct.  And you haven't even looked in the Modules
directory.

Another issue is to decide on the argument names.

IOW I'm hoping you'll forget it. :-)

--Guido van Rossum (home page: http://www.python.org/~guido/)