[docs] [issue37203] Correct classmethod emulation in Descriptor HowTo Guide

Raymond Hettinger report at bugs.python.org
Sat Jun 8 11:48:39 EDT 2019


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

This wasn't intended to be an exact equivalent. Instead, it focuses on the key action of classmethod which is prepending the class to the call.  Though less accurate, the current version communicates better.  I suggest adding a short comment to the effect that "newfunc" emulates "types.MethodType(self.f, klass)".

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37203>
_______________________________________


More information about the docs mailing list