Hi,
Nick Coghlan
One of the tasks where classic classes are currently far superior to new-style classes is in writing proxy classes like weakref.proxy - cases where nearly all operations need to be delegated to some other object, with only a few being handled via the proxy type object itself. Yes. I stumbled upon that multiple times when writing proxies for thread locals. The solution I came up with is rather ugly but works at least:
http://dev.pocoo.org/projects/werkzeug/browser/werkzeug/local.py#L202 The main problem with such proxies is that especially builtin types perform various type checks which break proxies sooner or later anyways (currently even abstract base classes implementing a compatible interface). So as soon as you start doing something like some_list + proxy_to_list you get a TypeError. Regards, Armin