Hacker News new | past | comments | ask | show | jobs | submit login

> Surely any "natural" string would be better represented as unicode in Python 2?

No because much of the stdlib works in terms of native strings and will choke (or worse silently fuck up) on the other. Yes also in python 2, the stdlib was absolutely not “unicode clean”.

So a transitional / polyglot codebase has and needs not 2 but 3 string types: bytes, unicode, and native. And neither “unicode literals” nor “bytes literals” were good things to apply across the board.




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

Search: