Message247160
| Author |
rhettinger |
| Recipients |
eric.frederich, eric.snow, rhettinger |
| Date |
2015年07月23日.01:32:59 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1437615179.62.0.343828554575.issue24685@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
This is an intentional design choice. One reason for tightly coupling OrderedDict to dict was to preserve freedom for a C-implementation. Another reason was for performance. IIRC, using super() in __setitem__ slowed the OD from 10x slower than dicts to 20x.
Non-cooperative classes (of which Python has many) can be wrapped to make the classes cooperative. The technique is discussed in the blog post https://rhettinger.wordpress.com/2011/05/26/super-considered-super/ . |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2015年07月23日 01:32:59 | rhettinger | set | recipients:
+ rhettinger, eric.snow, eric.frederich |
| 2015年07月23日 01:32:59 | rhettinger | set | messageid: <1437615179.62.0.343828554575.issue24685@psf.upfronthosting.co.za> |
| 2015年07月23日 01:32:59 | rhettinger | link | issue24685 messages |
| 2015年07月23日 01:32:59 | rhettinger | create |
|