Message107504
I understand that the latest RFE in this issue is to provide a custom __repr__ to functools.partial. Something along the lines of
class partial(functools.partial):
def __repr__(self):
return "functools.partial(%r, %s)" % (self.func,
', '.join(repr(a) for a in self.args)
>>> def f(x, y, z):
... pass
>>> partial(f, 1, 2)
functools.partial(<function f at 0x10065b060>, 1, 2)
Looks like a reasonable proposal, but coding this in C is a chore. (The prototype above does not process keywords, so complete implementation is more involved.) |
|
Date |
User |
Action |
Args |
2010-06-11 00:01:24 | belopolsky | set | recipients:
+ belopolsky, georg.brandl, terry.reedy, thomaslee, stribb |
2010-06-11 00:01:24 | belopolsky | set | messageid: <1276214484.3.0.91208270055.issue4113@psf.upfronthosting.co.za> |
2010-06-11 00:01:22 | belopolsky | link | issue4113 messages |
2010-06-11 00:01:21 | belopolsky | create | |
|