为什么 Python 3(或更高版本)比 Python 2 更好? [英] Why is Python 3 (or later) better than Python 2?

查看:37
本文介绍了为什么 Python 3(或更高版本)比 Python 2 更好?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大约 10 年前,我将 Python 作为我的第一门正式(非 BASIC)语言学习.从那以后,我学到了很多其他的东西,但我倾向于用 Python 来思考".当我查看更改列表时,我没有看到一个我需要这个功能.我通常对自己说,嗯,这会是一个很好的做法,但为什么现在要改变它?

I learned Python as my first serious (non BASIC) language about 10 years ago. Since then, I have learned lots of others, but I tend to 'think' in Python. When I look at the list of changes I do not see one I need this feature. I usually say to myself, hmm that would been a good way of doing it, but why change it now?

像更改默认楼层划分这样的事情对于大型项目来说可能是一个真正的痛苦改变.似乎主要参与者都在拖延.让我想投资另一个学习曲线的关键功能是什么?

Things like changing the default floor division could be a real pain to change for big projects. It seems like the major players are dragging their feet. What is the key feature that would make me want to invest in another learning curve?

推荐答案

作为一个关键功能,很多人似乎对 (据说) 透明的 unicode 支持.他们将它从 str(8 位字符数组/默认字符串类型)和 unicode(unicode 字符串)更改为 str(默认(unicode兼容)字符串)和 bytes(二进制数据为 8 位字符串").

As a key feature, a lot of people seem to be pretty exited about (supposedly) transparent unicode support. They changed it from str (8-bit char array/default string type) and unicode (unicode string), to str (default (unicode compatable) string) and bytes (binary data as 8-bit 'string').

(我认为从字符串中分离字节列表是个好主意,但我也讨厌 unicode,所以如果有的话,这对我个人来说会更糟.)

(I think seperation of byte lists from strings is great idea, but I also hate unicode, so if anything, this would be a worse for me personally.)

这篇关于为什么 Python 3(或更高版本)比 Python 2 更好?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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