Message75928
Calling a function created by _functools.partial as a method raises an
exception:
"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:00 | ssadler | set | recipients:
+ ssadler |
2008-11-16 06:33:00 | ssadler | set | messageid: <1226817180.09.0.841012218041.issue4331@psf.upfronthosting.co.za> |
2008-11-16 06:32:58 | ssadler | link | issue4331 messages |
2008-11-16 06:32:57 | ssadler | create | |
|