Guido van Rossum <guido <at> python.org> writes: > > I ran into the need of monkeypatching a large number of classes (for > what I think are very good reasons and invented two new recipes. > These don't depend on Py3k, and the second one actually works all the > way back to Python 2.2. Neither of these allows monkeypatching > built-in types like list. If you don't know what monkeypatching is, > see see http://en.wikipedia.org/wiki/Monkey_patch. > > I think it's useful to share these recipes, if only to to establish > whether they have been discovered before, or to decide whether they > are worthy of a place in the standard library. I didn't find any > relevant hits on the ASPN Python cookbook.
pypy has something that requires the base class to use a specific metaclass: https://codespeak.net/viewvc/pypy/dist/pypy/tool/pairtype.py?view=markup _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com