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

I think the author meant that UTF-32 is the worst encoding, though that seems to conflate choice of "length" definition with how the value is encoded internally.


No, just that you only want to expand the encoded string into Unicode wide bytes for certain operations and you want to pay that price only on demand.

The article also explains how internally this is an optimization the Python interpreter actually does.




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

Search: