[Python-Dev] compatibility for C-accelerated types
Serhiy Storchaka
storchaka at gmail.com
Sat Oct 17 18:38:21 EDT 2015
More information about the Python-Dev mailing list
Sat Oct 17 18:38:21 EDT 2015
- Previous message (by thread): [Python-Dev] compatibility for C-accelerated types
- Next message (by thread): [Python-Dev] compatibility for C-accelerated types
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
- Previous message (by thread): [Python-Dev] compatibility for C-accelerated types
- Next message (by thread): [Python-Dev] compatibility for C-accelerated types
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list