73
Python developers won’t let go of Python 2
(www.infoworld.com)
Welcome to the Python community on the programming.dev Lemmy instance!
Past
November 2023
October 2023
July 2023
August 2023
September 2023
Python 2 had one mostly-working
strclass, and a mostly-brokenunicodeclass.Python 3, for some reason, got rid of the one that mostly worked, leaving no replacement. The closest you can get is to spam
surrogateescapeeverywhere, which is both incorrect and has significant performance cost - and that still leaves several APIs unavailable.Simply removing
strindexing would've fixed the common user mistake if that was really desirable. It's not likeunicodeindexing is meaningful either, and now large amounts of historical data can no longer be accessed from Python.Thanks for that context. Seems odd that they would remove the
strinstead of taking the time to fix it.It's because
unicodewas really broken, and a lot of the obvious breakage was when people mixed the two. So they did fix some of the obvious breakage, but they left a lot of the subtle breakage (in addition to breaking a lot of existing correct code, and introducing a completely nonsensicalbytesclass).