[issue4331] Can't use _functools.partial() created function as method
Alexander Belopolsky
report at bugs.python.org
Fri Jan 29 01:25:26 CET 2010
Alexander Belopolsky <alexander.belopolsky at gmail.com> added the comment:
Christophe,
It looks like your patch goes out of its way to avoid creating nested partials. This is a worthwhile goal and I think it should be done in partial_new so that partial(partial(f, x), y) returns partial(f, x, y).
If fact, I was surprised to learn that current partial implementation does not behave this way:
>>> partial(partial(f, 1), 2).func
<functools.partial object at 0x100435af8>
Does anyone know the reason for the current behavior? It is possible that I am missing some subtlety related to keyword arguments.
----------
nosy: +Alexander.Belopolsky
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4331>
_______________________________________
More information about the Python-bugs-list
mailing list