[issue4113] Add custom __repr__ to functools.partial

Raymond Hettinger report at bugs.python.org
Thu Nov 18 10:54:59 CET 2010


Raymond Hettinger <rhettinger at users.sourceforge.net> added the comment:

> Looks like a reasonable proposal, but coding this in C is a chore. 

It's not that bad.  Most C code is a bit of a chore compared to Python but it really doesn't take much to write a C equivalent of: "functools.partial(%r, %s)" % (self.func, ', '.join(repr(a) for a in self.args)

>  How hard/inefficient would it be to have 99% of partial 
> coded in C and one stub in functools.py?

Let's not do this.  There is too little benefit to warrant going down the path of splitting the code across two langauges.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4113>
_______________________________________


More information about the Python-bugs-list mailing list