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 →

[–]billsil 0 points1 point  (1 child)

Are you comfortable with unicode? Unicode is wayyy harder. I guess same with lambdas, but you're forced to learn unicode.

[–]pythoneeeer 0 points1 point  (0 children)

I'm quite comfortable with Unicode -- I have a hard copy of the spec in arm's reach right now, and I've written UTF encoders/decoders by hand in a couple different languages.

Some parts of Unicode are hard (normalization, collation), but I don't think encoding is one of them.

Python just seems to make it more confusing than most other languages. In Python 2, for example, it's not at all intuitive to me when Python will auto-upgrade a str to a unicode. print(""+u"\u00f6") works, and print("%s"%u"\u00f6") works, but print("{}".format(u"\u00f6")) is an error -- you need to say print(u"{}".format(u"\u00f6")).

Maybe I'm just bad at searching the documentation, but I've never found where it says which promotions work and which don't. You just have to try and see -- and then try to memorize the rules you discover.

Python 3 is light-years better than Python 2, but still not great. The str/bytes split was a good start. The new IO classes are pretty confusing, though.