4 ms·
No. Python is extremely useful and will remain so. However Python has fundamental design problems regarding unicode handling and 2/3 discrepancies that make it
by droithomme 11y ago
No. Python is extremely useful and will remain so. However Python has fundamental design problems regarding unicode handling and 2/3 discrepancies that make it challenging to work with in a number of contexts.
- mjevans 11y agoI agree completely. Python could fix a LOT of that by using the (completely seriously named) https://simonsapin.github.io/wtf-8/ https://simonsapin.github.io/wtf-8/ WTF-8 (Wobbly Transformation Format − 8-bit) encoding for it's native Unicode (like) strings. Additionally Python should then allow the (explicit) casting of WTF8 datatype to bytes and from bytes to WTF8 datatype (edit: note, I mean invalid data would be read, stored within a WTF8 datatype as such, then converted /back/ to an invalid UTF-8 bytestream identical to the one read in). The main reason that Python Unicode handling is broken is that it creates problems that aren't necessary to exist or solve. In the real world, you encounter unvalidated data; and many times you don't /care/ if it's valid. It's just some human name for a bytestream. Or some not-quite valid Unicode stored within a file, or maybe something else that you want to handle like a bytestream but pick matching Unicode bits out of.
- zokier 11y agoYou mean something like PEP-0383? https://www.python.org/dev/peps/pep-0383/ https://www.python.org/dev/peps/pep-0383/