Hacker News new | ask | show | jobs
by raverbashing 4088 days ago
Exactly this

Why is changing 'print stuff' to 'print (stuff)' such a big deal?

I think 2To3 solves a lot of print cases https://docs.python.org/2/library/2to3.html

2 comments

To what end though? It's a small thing sure but it's busywork. Why am I being asked to do busywork?
Yeah, I don't like the busywork that Pep8 makes me do it, and it's a lot, and some of it is stupid, but it has to be done

You certainly don't have to do it if you don't want Python 3 and 2to3 makes it a lot easier

>Yeah, I don't like the busywork that Pep8 makes me do it, and it's a lot, and some of it is stupid, but it has to be done

Actually no, it hasn't. PEP8 is just a formatting standard, your code will work with your own standard too.

Guido doesn't like that tool; they're guidelines, not rules.
> Guido doesn't like that tool; they're guidelines, not rules.

Yes, a lot of people need to get that memo

I don't like it as well, but it keeps a group of developers in check. And it can be configured, so there's that as well

Too bad autopep8 produces bad results out of the box

The print function is clearly a better, more precise way to handle it, to be sure...

But the print statement was one prominent, attractive way that Python was essentially pseudocode-- its removal seems an improvement from a pedantic sense, but one that seems to run contrary to convenience and (perhaps) the expectations of a beginner.

I disagree about this being worse for beginners - if we're teaching a new programmer about functions, surely a basic print function is a great introduction? Whereas before it was a one-off special case.
As a beginner, I ~hated~ the print statement. The print function had analogous syntax to all other functions, whereas the print statement always seemed to use some kludgy tricks.