[issue27137] Python implementation of `functools.partial` is not a class

Emanuel Barry report at bugs.python.org
Wed Sep 7 09:41:58 EDT 2016


Emanuel Barry added the comment:

Hi Nick, thank you for letting me know! I started trying to fix this, however I found it very hard to fix the recursive repr issue. I've whipped up an incomplete (but yet working) patch that fixes all but the recursive repr issue. Only those two tests fail (once for functools.partial and once for the subclass). I have to go for now, but feel free to play with this patch and see if you can fix it. The problem is that the way it's handled is inconsistent within the C implementation, and is incompatible with reprlib.recursive_repr. I might try my hand at it later today or tomorrow.

In the meantime, I think maybe the C implementation cares too much about the special cases for that.

----------
Added file: http://bugs.python.org/file44436/functools_partial_3_1_incomplete.patch

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


More information about the Python-bugs-list mailing list