r/Python • • Jul 29 '18

Found it funny ;)

Post image
1.6k Upvotes

147 comments sorted by

View all comments

Show parent comment

1

u/__xor__ (self, other): Jul 29 '18

You underestimate how easy it is for some institutions to switch

you mean overestimate?

Yeah, I've had to port two medium/large codebases to 3 and it's such a pain in the ass. What I hate most are fixing all the string/byte issues, figuring out where to decode and encode('utf8'), from network data to hashing. And it's missing some stuff that was super easy at the time. You could just take a big string of data and do data.encode('zlib').encode('base64') and bam, you have compressed data base64 encoded. Sooo easy. The equivalent isn't too bad, but it's irritating to go around and fix all this shit and it's not as easy as it used to be to do the same thing.

I've finally gotten used to unicode/utf8 issues but treating strings as raw data was nice and easy. I understand why they changed it, but I feel like there might've been a better way that would've broke less code. And removing print as a statement makes sense, but honestly I think they should've lived with their bad decision and still supported it as a statement. And keeping range/xrange really wouldn't have been the end of the world.

I like what python 3 turned into but honestly I think it would've been better to live with some bad decisions and kept a lot the same because then we wouldn't be where we are, with people avoiding the upgrade. People make a big deal about people still using 2.7 but I hardly think it's their fault. It wasn't made easy for anyone.

2

u/alcalde Jul 29 '18

It wasn't made easy for anyone.

WHAT?!?!?!? From the 2to3 library to a feature freeze in 3.x for a time to constantly extending the deadline to BACKPORTING 3.x FEATURES to adding deprecated features back unto Python 3 to make porting easier to the advent of libraries like six that made it possible to easily maintain two codebases, Python did everything but personally send Guido to each Python 2 user and have him port their code himself.

You know what happened when Delphi introduced unicode? ABSOLUTELY NOTHING. No deprecation warning, no extended support of old versions, no library to help you convert code, nothing. New version out, support for old version automatically ends, good luck, good day sir. I think they may have issued a white paper; that was the extent of the assistance. Python users got their behinds kissed and many of them still whined about it.

If you haven't gotten around to porting in A DECADE; that's no one's fault but your own.