The only problem with Python 3's str is that you don't grok it
This title could be clearer and more informative.Try out Clickbait Shieldfor free (5 uses left this month).
Python 3's string handling is not broken — it correctly separates str (Unicode codepoints) from bytes (unsigned 8-bit integers). Python 2 conflated the two, leading to broken behavior with non-ASCII text. The post argues that complaints about Python 3 strings stem from misunderstanding this distinction, not from actual flaws. Practical examples show how to properly decode bytes to str and encode back, handle non-UTF-8 filenames, use os.listdir with bytes paths, and write files in different encodings. The author urges all developers to migrate to Python 3 immediately.
Sort: