Author Alexander.Belopolsky
Recipients Alexander.Belopolsky, Christophe Simonis, belopolsky, ironfroggy, rhettinger, ssadler
Date 2010-01-29.00:25:25
SpamBayes Score 1.66369e-07
Marked as misclassified No
Message-id <1264724726.83.0.593259708652.issue4331@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2010-01-29 00:25:27Alexander.Belopolskysetrecipients: + Alexander.Belopolsky, rhettinger, belopolsky, ironfroggy, Christophe Simonis, ssadler
2010-01-29 00:25:26Alexander.Belopolskysetmessageid: <1264724726.83.0.593259708652.issue4331@psf.upfronthosting.co.za>
2010-01-29 00:25:25Alexander.Belopolskylinkissue4331 messages
2010-01-29 00:25:25Alexander.Belopolskycreate