News for hackers. Stuff that matters.
Re:Making Python 3 more attractive by guipsp on Wednesday April 15, 2015 @03:19AM (#9379356)
from __future__ import print_function on python2 solves the print function incompat.
Re:Making Python 3 more attractive by raverbashing on Wednesday April 15, 2015 @03:24AM (#9379370)
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

Re:Making Python 3 more attractive by plesner on Wednesday April 15, 2015 @03:45AM (#9379425)
To what end though? It's a small thing sure but it's busywork. Why am I being asked to do busywork?
Re:Making Python 3 more attractive by raverbashing on Wednesday April 15, 2015 @04:24AM (#9379547)
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

Re:Making Python 3 more attractive by coldtea on Wednesday April 15, 2015 @04:50AM (#9379642)
>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.

Re:Making Python 3 more attractive by raverbashing on Wednesday April 15, 2015 @05:22AM (#9379776)
Re:Making Python 3 more attractive by alexchamberlain on Wednesday April 15, 2015 @05:59AM (#9379895)
Guido doesn't like that tool; they're guidelines, not rules.
Re:Making Python 3 more attractive by raverbashing on Wednesday April 15, 2015 @06:19AM (#9379960)
> 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

Re:Making Python 3 more attractive by bufordsharkley on Wednesday April 15, 2015 @03:28AM (#9379382)
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.

Re:Making Python 3 more attractive by TimSAstro on Wednesday April 15, 2015 @04:23AM (#9379542)
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.
Re:Making Python 3 more attractive by panglott on Wednesday April 15, 2015 @10:55AM (#9381344)
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.