Message98490
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. |
|
Date |
User |
Action |
Args |
2010-01-29 00:25:27 | Alexander.Belopolsky | set | recipients:
+ Alexander.Belopolsky, rhettinger, belopolsky, ironfroggy, Christophe Simonis, ssadler |
2010-01-29 00:25:26 | Alexander.Belopolsky | set | messageid: <1264724726.83.0.593259708652.issue4331@psf.upfronthosting.co.za> |
2010-01-29 00:25:25 | Alexander.Belopolsky | link | issue4331 messages |
2010-01-29 00:25:25 | Alexander.Belopolsky | create | |
|