On 15 Jan 2008, at 15:37, Guido van Rossum wrote: > Second, a "metaclass" to add a number of methods (or other attributes) > to an existing class, using a convenient class notation: ... > class <newclass>(<someclass>): > __metaclass__ = monkeypatch_class > def <method1>(...): ... > def <method2>(...): ... > ... In Objective-C it's perfectly common to extend existing classes using 'categories' and I have often found this idiom very useful. What is described here is basically categories for Python. I've implemented something like this before and I would be happy to see this added to the standard library and formalised. Nicko
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