overloading *something

Robert Kern robert.kern at gmail.com
Wed Nov 9 17:39:31 EST 2005


James Stroud wrote:

> That **kwargs insists on using the C-side interface is precisely the annoyance 
> to which I am referring. I should be able to write a dictionary-like 
> interface in python and **kwargs should in turn be able to use it. If the 
> retort is that the C-side interface is used for performance, my retort to the 
> retort is that an isinstance() is already being called somewhere, so no 
> additional tests would need to be made to make **kwargs more generalized.

Well, the test is in Python/ceval.c (grep for the error message) and the
function that needs a bona fide dictionary is PyObject_Call in
Objects/abstract.c . If you can work up a patch, Guido will probably
consider it although I would suggest searching python-dev for previous
discussions first.

-- 
Robert Kern
rkern at ucsd.edu

"In the fields of hell where the grass grows high
 Are the graves of dreams allowed to die."
  -- Richard Harter




More information about the Python-list mailing list