[issue4331] Add functools.partialmethod

Nick Coghlan report at bugs.python.org
Thu Oct 31 14:54:40 CET 2013


Nick Coghlan added the comment:

Updated patch based on Alon's last patch.

The major functional change is to ensure __self__ is set appropriately on any bound methods returned by the descriptor.

I also updated the docs and docstring, and added a What's New entry (as well as rewording the existing entry for functools.singledispatch)

There were a few other cosmetic changes, with the most noticeable being moving the partialmethod implementation and tests adjacent to the existing ones for functools.partial.

Assuming nobody pokes any significant holes in this idea and implementation in the meantime, I'll commit this before beta 1.

----------
Added file: http://bugs.python.org/file32436/issue4331_partialmethod.diff

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


More information about the Python-bugs-list mailing list