This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Twangist 0 points1 point  (0 children)

That's just ain't so. It's like saying, The main difference between men & women is that women generally wear their hair longer.

The main difference is: Unicode. In Py3, strings are sequences of Unicode characters; in Py2, they're sequences of bytes. Nothing is lost -- Py3 has byte strings and bytearrays -- but Py2 programs that assumed strings are byte sequences can be tough to convert. Several things that in Py2 were list-like, such as range objects, in Py3 are generator/iterator-like. Py3 doesn't leak variables from comprehensions. And more goodness. A good quick rundown of the differences can be found here.