[issue7830] Flatten nested functools.partial
Virgil Dupras
report at bugs.python.org
Fri Jul 23 14:13:41 CEST 2010
Virgil Dupras <hsoft at hardcoded.net> added the comment:
Applies cleanly on the py3k branch at r83069, the tests work correctly (fail before applying the patch, success afterwards), and, to the best of my C-API knowledge, the C code is alright.
Oh, and it behaves as described...
Python 3.2a0 (py3k:83069M, Jul 23 2010, 12:40:49)
[GCC 4.2.1 (Apple Inc. build 5659)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> def foo(a, b, c): pass
...
>>> from functools import partial
>>> p1 = partial(foo, 1)
>>> p1.func, p1.args
(<function foo at 0x1004531e8>, (1,))
>>> p2 = partial(foo, 2)
>>> p2.func, p2.args
(<function foo at 0x1004531e8>, (2,))
----------
nosy: +vdupras
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7830>
_______________________________________
More information about the Python-bugs-list
mailing list