应该在python2.6中使用OrderedDict的哪个实现? [英] Which implementation of OrderedDict should be used in python2.6?

查看:363
本文介绍了应该在python2.6中使用OrderedDict的哪个实现?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因为你们中有些人可能在python2.7 / 3.2中知道,我们将得到OrderedDict与 PEP372 然而,PEP存在的原因之一是因为每个人都执行自己,并且他们完全不相容。



所以目前的8个实现中的哪一个在PEP 是向后兼容2.7的恶意从python 2.7,我们可以开始使用现在,依赖于2.7几个月?

解决方案

这个包(对于Python 2.4或更好)声称是Py2.7的新collection.OrderedDict在Python 2.4-2.6中可以使用的替代品,但是我没有检查该声明。


As some of you may know in python2.7/3.2 we'll get OrderedDict with PEP372 however one of the reason the PEP existed was because everyone did their own implementation and they were all sightly incompatible.

So which one of the 8 current implementations in the PEP is backwards compatible with the 2.7 odict from python 2.7 in a way we can start using that now and depend on 2.7 in a couple of months?

解决方案

This package (for Python 2.4 or better) claims to be "A drop-in substitute for Py2.7's new collections.OrderedDict that works in Python 2.4-2.6.", but I have not checked that claim.

这篇关于应该在python2.6中使用OrderedDict的哪个实现?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆