4 ms·
Agreed, Python 3 is in almost all aspects better and I really prefer 3 over 2. Most of the bigger 3rd libraries are already ported, at least all the ones I care
by mrweasel 12y ago
Agreed, Python 3 is in almost all aspects better and I really prefer 3 over 2. Most of the bigger 3rd libraries are already ported, at least all the ones I care about.
Numpy seems to be the biggest issue for most, but I guess it must be in some special area, I never found a need for it doing web development.
The unicode support removes so many of our problems, although I can understand the issues strings vs. bytes that a some people run into.
- neals 12y agoSo what is this strings vs bytes thing all about?
- mrweasel 12y agoI think Armin Ronacher has the best overview: http://lucumr.pocoo.org/2014/1/5/unicode-in-2-and-3/ http://lucumr.pocoo.org/2014/1/5/unicode-in-2-and-3/ But it's basicly Python three killing of the byte-string and ignoring the fact that in some cases it actually makes sense to work with string that are specifically not unicode, rather than resorting to have a bytes type instead.
- pekk 12y agoI don't see how it is coherent to ask for a string that is not unicode, and not bytes. What is it?
- dragonwriter 12y agoA string encoded in some non-unicode encoding. Not everything in the world is unicode (or unicode compatible the way, say, US-ASCII is.)
- rowyourboat 12y agoHistorically, when the computing world only knew about English, a character was represented by a byte. That led to a string being essentially byte array. As such, the concepts of a byte and a char and a buffer and a string were often used interchangeably (in fact, the 8-bit-type in C is called char). With Unicode and the need to parse international text, however, a character can no longer be represented as a simple byte, and things have become messy. Python3 finally cleanly separates the concepts of a "byte" (8 bits) and a "character" (which now is an abstraction). A String is now a collection of characters and no longer functionally equivalent to an array of bytes. This change is normally welcomed by people who have to deal with multiple languages and encodings anyway, as making the conceptual difference between a character and a byte explicit makes dealing with text much easier. However, if you were used to thinking of strings as byte arrays and not as "the data type for text", you might have a hard time.
- illumen 12y agoNumpy works really nicely on python 3. Numpy was ported to python3 years ago. It was one of the first libraries who rolled up their sleeves and did the work for the good of the python community. I even helped with this, so I know first hand.
- mrweasel 12y agoÓh, you're right... I wonder what I was thinking about then... SciPy maybe, but that's been ported as well.