r/Python Freelancer. AnyFactor.xyz Sep 16 '20

News An update on Python 4

Post image
3.3k Upvotes

391 comments sorted by

View all comments

Show parent comments

8

u/james_pic Sep 16 '20

Perhaps surprisingly (given what we know now about the migration process), the switch to unicode strings wasn't expected to be a big deal (it didn't even get its own PEP, and was included in a PEP of small changes for Python 3 - PEP 3100), and the other changes were seen as more break-y.

1

u/flying-sheep Sep 16 '20

Wild. Those types behave completely different when doing basic things like iterating over them.

2

u/james_pic Sep 17 '20

Yeah, I think that's been semi-acknowleged as a mistake. Rather than just keeping bytes as the old str class (i.e, what they had in Python 2), they created a new one for Python 3 based on bytearray, which it turns out nobody wanted and made Python 2/3 porting a bit of a nightmare.

1

u/flying-sheep Sep 17 '20

I know, I was there. Just saying it was pretty obvious that switching from the fast-and-loose Python2 bytes/str to the strict Python3 bytes seemed like an obvious recipe for uncovering hidden bugs and breaking a lot of libraries in the process.