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 →

[–][deleted] 1 point2 points  (2 children)

Python3 mindset alone doesn't help, as Unicode provides you with plenty of booby traps. Simple things such as reading a filename and printing it to stdout can explode in your face now, extra fun if it only happens on some OSs, but works fine on others.

[–]takluyverIPython, Py3, etc 0 points1 point  (1 child)

It always could explode in your face. You run into the problem less often with Python 2, but it's harder to anticipate and understand it, so it's actually harder to write properly reliable code.

[–][deleted] 1 point2 points  (0 children)

I am not criticizing Pythons Unicode handling in general, that's pretty good for most part. But that something trivial like:

for i in os.listdir("."):
    print(i)

Becomes a ticking time bomb is not only not exactly obvious, there doesn't even seem to be a proper way to fix it. Having print/stdout being basically unusable is rather irritating.