Why I don't like Python 3
Python 3 sucks. I hate that they've made changes so that aren't backwards-compatible. You can't run many Python 2 scripts using the Python 3 interpreter. It's almost like they've gone out of their way to piss off developers.
Here are some specific reasons why I hate Python 3:
- My biggest gripe: print is a function rather than a statement now. I'm not saying it's not a good idea for print to be a function but why fuck with existing scripts? Just keep the print statement as-is and create a new function with a distinct name.
- Data read from files comes back as bytes and you have to encode them. More on this later but I think this is nonsense.
- You can't write a simple string to a file opened for binary. Yes, I know about string.encode() but my point is I don't like having to use it.
- You can't turn off buffering when you open a text file for writing: open('foo', 'w', 0) throws can't have unbuffered text I/O! Bullshit! Sure, you can use 'wb' but why should we have to do that?
- A style like 0o100 is now required for octal (which I was never a big fan of) and 0100 is an error! What the hell!!
In this brave new world of Python 3, I've gotten used to it and have put Python 2 in the past. I don't mind the print problem so much anymore but binary/text is often still challenging.
ReplyDelete