python第三方库规模有多大_初学者求助:2014年python 2.x和3.x的第三方库差距还那么大吗?...

该楼层疑似违规已被系统折叠 隐藏此楼查看此楼

楼上这个“学”字用的有问题吧?

2和3基本上差不多,学了一个,只要留意一下区别,马上就会了另一个。

所以真正的问题不是“学哪个”,而是“用哪个”,因为这牵扯到第三方模块的生态圈问题。

Python官方的意见是:

In particular, instructors introducing Python to new programmers may want to consider teaching Python 3 first and then introducing the differences in Python 2 afterwards (if necessary), since Python 3 eliminates many quirks that can unnecessarily trip up beginning programmers trying to learn Python 2.

特别是,教师在给新手教Python的时候,可以先教3,然后再讲讲2和3的区别(如果需要的话)。因为3改进了2的很多“怪癖”,这些“怪癖”可能对新手造成不必要的迷惑。

However, there are some key issues that may require you to use Python 2 rather than Python 3.

Firstly, if you're deploying to an environment you don't control, that may impose a specific version, rather than allowing you a free selection from the available versions.

Secondly, if you want to use a specific third party package or utility that doesn't yet have a released version that is compatible with Python 3, and porting that package is a non-trivial task, you may choose to use Python 2 in order to retain access to that package.

另外,也许有两条重要的因素要求你使用Python2,而不是3:

1、在某些你控制不了的环境,逼迫你使用指定版本。(译注:比如接手一个Python2写的既有项目)

2、如果你要使用某些第三方包/模块,而这些第三方包/模块没有迁移到Python3,并且迁移的工作量很大,你可以选择Python2。

所以,楼主先学着,学的过程中留意一下你可能用到的第三方包/模块是否已经迁移到3。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值