News for hackers. Stuff that matters.
Re:Google's Python Class by JustSomeNobody on Tuesday March 06, 2018 @02:57PM (#16531550)
I don't understand what the big deal is. If you learn Python 2, you're 95% of the way to Python 3. Honestly, this is like arguing over spaces and tabs. It gets old.
Re:Google's Python Class by sametmax on Tuesday March 06, 2018 @03:41PM (#16531931)
It is not though. Python 3 is wayyyy easier to teach. And i should know since it's my job.
Re:Google's Python Class by mbreese on Tuesday March 06, 2018 @04:24PM (#16532221)
Got a couple of quick examples where Python 3 is easier?

Is it that it is more consistent in places?

Re:Google's Python Class by mynewtb on Tuesday March 06, 2018 @05:51PM (#16532809)
String handling that makes sense

No more long type

Division that works as expected

Annotations

No more xrange, iteritems etc, instead you get iterators everywhere

f-strings

Re:Google's Python Class by squeaky-clean on Tuesday March 06, 2018 @06:38PM (#16533140)
I think my personal favorite is exception chaining. Makes it so much easier to debug issues, especially for newbies.
Re:Google's Python Class by devy on Tuesday March 06, 2018 @05:33PM (#16532706)
Unicode handling. Python2's implementation on that is broken.
Re:Google's Python Class by gdwatson on Tuesday March 06, 2018 @04:25PM (#16532228)
I'm a Python 3 fan, but I didn't expect that. Could you explain why?
Re:Google's Python Class by sametmax on Wednesday March 07, 2018 @04:32PM (#16540100)
It's the aggregate of so many little things.

Less duplicates (xrange vs range, itemview/iteritems/items(), map/itertols.map,).

Entering french in comments will not crash the program even if you didn't give "the unicode talk". Clear type for raw bytes with a proper name.

Way less verbose (no __future__, no u, no object, no codecs import, f-strings, simple super(), etc)

Debugging is easier (debug messages are better, exception chaining, division makes sense, repr is clearer)

You can't shoot yourself in the foot as much (ordering "1" and 1, assigning to True ...)

Less stuff to learn (e.g: pathlib instead of os/shutils/glob/codecs)

And that's just out of my head.

Re:Google's Python Class by PeterMikhailov on Tuesday March 06, 2018 @03:02PM (#16531594)
Depending on your opinion, p3 solves Unicode issues.
Re:Google's Python Class by ehsankia on Tuesday March 06, 2018 @03:35PM (#16531885)
You're not really countering what he said by naming something in the 5%. Yes, there's slightly different string behavior when working with unicode, most things return iterators instead of lists, and print is now a function.

Going from knowing Python 2 to 3 is far easier than going from not knowing Python or programming at all to knowing Python 3.

Re:Google's Python Class by JustSomeNobody on Tuesday March 06, 2018 @03:09PM (#16531641)
> Welcome to Google's Python Class -- this is a free class for people with a little bit of programming experience who want to learn Python.

Python 2 still comes pre-installed on most everything. So, why can't someone coming to Python with little or no experience just be welcomed to use what they have for now?

I kid you not, some of these Python3'ers would have a newb bike shed for a week getting a whole Python 3 workflow with virtual environments, etc going before they'd let the person write their first hello, world. They can learn that stuff later, when it matters.

Re:Google's Python Class by fermienrico on Tuesday March 06, 2018 @03:18PM (#16531748)
>> So, why can't someone coming to Python with little or no experience just be welcomed to use what they have for now?

So, why can't someone coming to Python with little or no experience just install the latest version?

Just shedding some light on both sides of the argument. I'd prefer people starting out use the latest version because it is not hard to install Python 3 and takes very little effort.