[Python-bugs-list] [ python-Bugs-414354 ] PyArg_ParseTupleAndKeywords is misnamed

noreply@sourceforge.net noreply@sourceforge.net
Fri, 06 Apr 2001 11:11:05 -0700


Bugs item #414354, was updated on 2001-04-06 11:11
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=414354&group_id=5470

Category: Documentation
Group: None
Status: Open
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Fred L. Drake, Jr. (fdrake)
Summary: PyArg_ParseTupleAndKeywords is misnamed

Initial Comment:
This actually describes a mechanism for handling *optional arguments* using argument names, not true keyword handling.  True keyword handling would allow specification of arbitrary values.  For example, in Python code, I can have my functions accept arbitrary keyword arguments and pass them on to another function even if I don't understand them myself (Tkinter does this a lot).  If I try to pass a keyword parameter named xyzzy to an *extension* module that only understands foo and bar parameters, though, I get an error.  The only semi-reasonable alternative is to pass a normal argument that happens to be a dictionary of keyword arguments, but that's not really the same.

Ideally, extensions would be allowed to use true keywords.  Failing that, the documentation should be amended to reflect the lesser functionality that PyArg_ParseTupleAndKeywords actually provides.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=414354&group_id=5470