On 2017-02-10 05:44, Markus Meskanen wrote: > > > On Fri, Feb 10, 2017 at 12:29 PM, Stephan Houben <[email protected] > <mailto:[email protected]>> wrote: > > What about using a simple decorator instead? > > def monkey_patch(cls): > return lambda func: setattr(cls, func.__name__, func) >
I suggest naming the decorator with something less generic than "monkey_patch", like "extension_method".
_______________________________________________ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
