Python最早常用的版本
是否有官方更新的建议表明已发布的模块应支持哪些版本的 Python?或者也许是一个提供各种版本的生产使用情况调查的页面?在编写模块时,很难知道有多少新功能(例如上下文管理器、类装饰器等)的用途。
请注意,了解现在常用的 Python 版本只是我的问题的一部分;我想找到一个资源,为该线程的未来读者(和我自己)提供最新信息。
Is there an officially updated recommendation indicating which versions of Python should be supported by released modules? Or perhaps a page giving a survey of production usage of various versions? It's difficult to know how much use to make of newish features like context managers, class decorators, etc. when writing a module.
Note that learning which versions of Python are in common usage now is only part of my question; I'd like to find a resource which will provide up-to-date information for future readers of this thread (and myself).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不知道有任何单一资源可以保存不同 Python 版本的生产使用情况的最新摘要,但一个好的开始可能是检查随各种 Linux 发行版一起分发的 Python 版本。以下是一些最常用的服务器发行版的示例(取自 Distrowatch):
Debian
Ubuntu
Red Hat Enterprise Linux
显然,Red Hat 是这里的限制因素。最新的稳定 RHEL 版本附带 Python 2.4,并且由于有相当数量的 RHEL 服务器,您必须以 Python 2.4 为目标,除非您希望 Red Hat 用户从源代码或第三方 RPM 安装更新的 Python 版本。如果您不介意放弃 RHEL,您可能会选择 2.5 或 2.6。
I'm not aware of any single resource keeping an up-to-date summary of production usage of different Python versions, but a good start would probably be to check which Python versions that are distributed with various Linux distributions. Here's a sample for some of the most used server distributions (taken from Distrowatch):
Debian
Ubuntu
Red Hat Enterprise Linux
Clearly, Red Hat is the limiting factor here. The latest stable RHEL release ships with Python 2.4, and as there's a fair number of RHEL servers out there, you'll have to target Python 2.4 unless you want Red Hat users to install a newer Python version from source or from third-party RPMs. If you don't mind leaving RHEL behind you could probably go for 2.5 or 2.6 instead.
Mac OS X 10.6 (Snow Leopard) 的安装版本为 2.6.1。
IIRC,10.5(Leopard)有2.5作为安装版本。
Mac OS X 10.6 (Snow Leopard) has 2.6.1 as the installed version.
IIRC, 10.5 (Leopard) has 2.5 as the installed version.