Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'd argue that the people correctly handling encodings in Python 2 were vastly outnumbered by the people that weren't, but were getting away with it because the code didn't outright crash. Now in Python 3 it crashes, which is a pain in the short term but better in the long run.


I don't really think it's better - certainly it was not better until many years after release when they started admitting their big mistakes.

But even today, codepoint indexing is too easy and doesn't crash so lots of code is still subtly wrong. Memory usage of a string grows 3x if you add a single emoji. Most libraries are still agnostic about whether they take bytes or str so you still get exceptions thrown with no easy solution. (The growing popularity of type hints is fixing this, but that's not really related to Python 3.)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: