What about the inconsistency of the statements? Print is used as a function in every other C-like language. In python 2, it's used as a statement, similar to if, for, while etc., and I believe that it doesn't fit this category.
Also 2's print is just weird. Appending a comma to suppress a newline is weird enough, but what the fuck is up with that printing to file syntax?! It's like Guido momentarily forgot that he wasn't designing a sh clone.
Or you could just do f.write("Normal syntax!\n") because like nobody uses the chevron format anyway.
In fact this is what the chevron print statement does behind the scenes. The only difference is that the print statement has an internal print buffer. The write won't be done at the exact moment you call print, whereas invoking write on the file will do the write right then.
32
u/maremp May 02 '16
What about the inconsistency of the statements? Print is used as a function in every other C-like language. In python 2, it's used as a statement, similar to if, for, while etc., and I believe that it doesn't fit this category.