On 18.10.15 01:20, Eric Snow wrote: > On the tracker he notes another OrderedDict compatibility break: > > Backward compatibility related to __class__ assignment was > already broken in C implementation. In 3.4 following code > works: > > >>> from collections import * > >>> class foo(OrderedDict): > ... def bark(self): return "spam" > ... > >>> class bar(OrderedDict): > ... pass > ... > >>> od = bar() > >>> od.__class__ = foo > >>> od.bark() > 'spam' > > In 3.5 it doesn't. Sorry, I was mistaken with this example. It works in 3.5.
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