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
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4