Author ssadler
Recipients ssadler
Date 2008-11-16.06:32:55
SpamBayes Score 4.94892e-08
Marked as misclassified No
Message-id <>
Calling a function created by _functools.partial as a method raises an

"TypeError: method_new() takes exactly n non-keyword arguments (0 given)"

Where method_new is the function passed into partial() and n is the
number of arguments it expects.

This does not happen when using a python version of partial().

Strangely, in the circumstance that I originally encountered the bug,
there was one instance that I was doing this and it _DID WORK_. The
function being passed into partial() was the same as in the place where
it was failing. The only significant difference that I could see was
that the input function to partial() was being imported, rather than
being defined in the same namespace as it was used I was unable to
reproduce it in my test case (attatched).

Tested on 2.6 and 2.5.2
Date User Action Args
2008-11-16 06:33:00ssadlersetrecipients: + ssadler
2008-11-16 06:33:00ssadlersetmessageid: <>
2008-11-16 06:32:58ssadlerlinkissue4331 messages
2008-11-16 06:32:57ssadlercreate