[issue4331] Can't use _functools.partial() created function as method

Ulrich Eckhardt report at bugs.python.org
Thu Feb 7 09:36:05 CET 2013


Ulrich Eckhardt added the comment:

Just for the record, the behaviour is documented, unfortunately in the very last line of the functools documentation: "Also, partial objects defined in classes behave like static methods and do not transform into bound methods during instance attribute look-up."

Concerning how exactly they should behave during that lookup, I'd use the least surprising variant, namely that they are not treated differently from other functions: The first parameter is implicitly "self".

----------
nosy: +eckhardt

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4331>
_______________________________________


More information about the Python-bugs-list mailing list