Alexander Belopolsky <alexander.belopol...@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 <rep...@bugs.python.org>
<http://bugs.python.org/issue4331>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to