It's hard to understand that they could think Python 2 to be the valid choice for this, as though Python 3 was "the future" and things are heading there.
Python 3 is the present, we are there, Python 2 is the past and in 2 short years it will be unsupported and whatever you learned from this resource will need to be re-learned for Python 3 pretty damn quick.
It's Google deciding to publish their formerly internal documentation as a public service. If they're using Python 2 internally, of course their internal documentation is going to be on Python 2. Releasing it is purely positive.
Still, if you need to search for today's reason to switch to DuckDuckGo, I guess Google releasing a free class for the wrong version of Python is as good as any.
If you are releasing a free Python class under the Google brand, but the content is almost a decade old[1] and a lot of it will be phased out shortly or unsupported in 2 short years, you are doing the community a dis-service.
Stop assuming freebie is always good stuff or Google always release high quality content.
Disclaimer: I am a long time python developer and I love Google's service in general.
> If you are releasing a free Python class under the Google brand, but the content is almost a decade old[1] and a lot of it will be phased out shortly or unsupported in 2 short years, you are doing the community a dis-service.
Companies use things that are "out of date" due to various factors. You could shit on a "IBM's COBOL Class" because COBOL is old as shit, but it doesn't change the fact that there is a lot of COBOL out in the world, and a need for folks to learn it so that they may maintain or migrate it.
Just because Python 3 is the shiny new version and the future of the language doesn't change that there is going to be a lot of Python 2 out there and folks will need to learn and understand it.
>Just because Python 3 is the shiny new version and the future of the language doesn't change that there is going to be a lot of Python 2 out there and folks will need to learn and understand it.
1) Teaching beginners' Python 2 , the motives are suspicious -- especially considering Googles' use of Python 2 internally.
It's not entirely noble to train beginners' to familiarize themselves on languages that are on their way out just so that they can maintain your legacy code once they get some experience. It's profit maximizing, speaks to their thought-process behind the employees' career, and points towards a culture that's uninterested in internal improvement when things work to turn a profit.
2) Python 2 is not Python, it's Python 2. Programming tutorials for "Python" muddy the search-query waters and make it difficult for beginners to find specific information. This happened to the Lisps, and it's a big barrier to entry for beginners to the language(s).
3) Python 2 can be easily understood by Python 3 users. In fact, it's often more verbose and easier to wrap your head around than Python 3, and the syntactic differences are minor unless you're using advanced features.
I'm sure Google is just releasing internal stuff that's been around for years -- I just think its' disingenuous to refer to what they teach as 'Python'.
Yeah; it's Python if you're a googler; it's python 2 to the rest of the world -- and it's on the way out.
P.S. if my company sent me to a seminar on COBOL, i'd be well aware of the position they expected of me -- and i'd have one foot out the door.
> I just think its' disingenuous to refer to what they teach as 'Python'.
Well what do you propose we call it? Cobra? It's still Python, just not the latest version.
> P.S. if my company sent me to a seminar on COBOL, i'd be well aware of the position they expected of me -- and i'd have one foot out the door.
To be frank, you sound like a prima donna. Part of software engineering is maintenance and migration. If my company sent me out to learn COBOL I'd be happy for an interesting challenge that I'd not normally be exposed to.
Python is the #1 fastest growing programming language on Stackoverflow.[1] and #4 on TIOBE index[2]. There is a huge need for good and current python tutorials and/or online classes for the growing community. I applaud the intent for Google to contribute.
BUT if your content is not current or not up to the bar, perhaps you shouldn't even consider releasing it? Google internally has a lot of Python 2 code no doubt, but for the beginners that want to learn python, Google's python class is not even on par with the expectation out there.
COBOL doesn't even make it to the top 25 on TIOBE index, so your comparison doesn't matter. Who wants to learn COBOL these days if they weren't mandated by the job or for teaching?
A better analogy would be IBM releasing a tutorial for an unsupported version of COBOL and calling it a tutorial for "modern" COBOL.
In a nutshell, it's not about Python 2 being old, it's about calling Python 2 "Python" when that hasn't been the case for a few years now at the least.
> A better analogy would be IBM releasing a tutorial for an unsupported version of COBOL and calling it a tutorial for "modern" COBOL.
Well, no, they've made no comparable claim.
From skimming the material, not only does Google not refer to Python as "modern" but provide the caveat
> For Google's Python Class, it's best to use Python 2.7. Although Python 3.x is becoming more popular, this course is designed for Python 2.6 or later.
I suppose to some folks they should provide a disclaimer with road flares warning of Danger Ahead, but it's not as if they're intentionally misleading.
> Unless the reader is aware of the state of Python 2 vs. 3, he/she wouldn't even bat an eye.
If I were looking at learning Python and read that line I'd stop and dig a little deeper.
I hate on Google as much as the next neo-Luddite, but they're putting out quality material on a topic that some folks will need. Y'all are pretty damn hateful.
The notion that the Python core devs get to decide when Python 2 should stop being used is not cool.
Under the freedoms provided by Free Software licensing, users who have a need to continue to use Python 2 should be able pool their effort to continue to support Python 2.
There was an effort called Python 2.8 to do this, but the Python Software Foundation made it change its name and I don't recall what the new name is. It's not particularly nice that the thing that's compatible with what was called Python to begin with is the one that got renamed.
This feels kind of entitled, to be honest. The core devs don't owe you indefinite support for your chosen version. Absolutely they get to decide when they want to stop supporting it (and they already gave it a ridiculously extended support lifetime!).
The PSF also owns the "Python" trademark and the whole purpose of trademarks is to prevent confusion about who made something, i.e. exactly the kind of confusion a Python 2.8 that isn't made by the same people who made Python 2.7 would have caused.
Entitled to the name perhaps, but _not_ entitled to indefinite support by the core devs.
> The core devs don't owe you indefinite support for your chosen version. Absolutely they get to decide when they want to stop supporting it (and they already gave it a ridiculously extended support lifetime!).
I agree! I said the users of Python 2 should be able to pool effort to continue to support Python 2.
Yet, there is a lot of sentiment in this thread that whether Python 2 should continue to be used should be tied to whether the Python core devs are still supporting it. Similarly, there is widespread sentiment that e.g. Linux distros should drop Python 2 and packaging Tauthon in its place doesn't even make it to the agenda.
> The PSF also owns the "Python" trademark and the whole purpose of trademarks is to prevent confusion about who made something, i.e. exactly the kind of confusion a Python 2.8 that isn't made by the same people who made Python 2.7 would have caused.
I'm well aware that the PSF is legally entitled to exclude Tauthon from being called Python 2.8. It's still not particularly nice towards the users of the language who bet on Python 2 and who'd benefit from easy discovery of Tauthon.
Imagine if Stroustrup had gone on to develop the language that's in reality called D but insisted that it be called C++ and the language everyone else knows as C++ be renamed if developed further in a backward-compatible way.
Once there is no longer a Python 2.x by the Python core devs to confuse Tauthon with, it's arguably more confusing for Python 2 and Python 3 to share a name but Python 2.x and Tauthon not to. (For clarity, the previous sentence is not a legal argument. I'm well aware that the public who could be confused about names doesn't have standing under trademark law.)
> The notion that the Python core devs get to decide when Python 2 should stop being used is not cool.
They don't. They just won't support it anymore, nor provide updates for it.
> Under the freedoms provided by Free Software licensing, users who have a need to continue to use Python 2 should be able pool their effort to continue to support Python 2.
They can, just not under the name of Python, as this name is owned by the Python Software Foundation. Similarly Canonical would crack down on someone opening a project 'Ubuntu12', continuing to support Ubuntu 12.x versions.
> There was an effort called Python 2.8 to do this, but the Python Software Foundation made it change its name and I don't recall what the new name is.
And the people who decided to do this are well within their rights to do so - it is free software after all. Just - as explained in the last paragraph - not with the name Python.
This isn't only to prevent the brand 'Python' to be influenced by a project out of the reach of the foundation, but also to prevent confusion for newcomers.
> The notion that the Python core devs get to decide when Python 2 should stop being used is not cool.
Many major libraries have already released their last version supporting Python 2 or announced plans to do so by the end of this year, several have already released the first major version that does not support Python 2.
Core decision that Python 2 wouldn't be supported past 2020 played a role in timing, but isn't the decisive factor in why Py 2 is being dropped: many of the projects specifically said Py 2 was holding them back.
> Under the freedoms provided by Free Software licensing, users who have a need to continue to use Python 2 should be able pool their effort to continue to support Python 2.
They are free to do so.
> There was an effort called Python 2.8 to do this, but the Python Software Foundation made it change its name and I don't recall what the new name is.
Tauthon, I think, is the project you are referring to.
> It's not particularly nice that the thing that's compatible with what was called Python to begin with is the one that got renamed.
Free Software principles don't make names public domain; you don't get to steal a project’s name because you object to major release.
> The notion that the Python core devs get to decide when Python 2 should stop being used is not cool.
This is incorrect. They get to decide when they stop supporting it. Of course that's within their rights, and a 2020 sunset date on a version released in 2010 is a very long LTS window.
> It's not particularly nice that the thing that's compatible with what was called Python to begin with is the one that got renamed.
This is how copyright works. Someone else is free to release a MyPython 2.8 if they'd like, but they're not free to call it Python.
You seem to not understand how the freedoms of Free Software licensing work.
You are absolutely able to go clone their git repo right now (https://github.com/python/cpython) and work on it as your own. You can create updates, backport fixes, etc. You can maintain that well after they cease supporting python 2.7.
You may not call it Python though, because of trademarks.
You do know this resource was published circa 2010, right? It's not a new course, and back then Python 3 wasn't anything.
Also, you should note that most systems that come with python pre-installed still come with 2.x, so the last update to this (March 2016) could have been accommodating that fact.
Likely explanation: Not updated in a while and mostly meant for internal use, where developers will mostly interact with Google's legacy systems. I'd also take a guess here and suspect that Google might have a larger than usual share of 2/3 incompatible code (binary-text-boundaries are notorious).
That certainly appears to be the perception they've created with many. I don't see it that way entirely, because it seems like any programmer using Python will have to come face to face with the intricacies of how Python 2 and 3 differ. If they write all their projects in Python 3 they may never feel comfortable approaching legacy codebases, but if they start off in Python 2 they're going to be peer pressured into learning 3 as well, and get experience with what goes into porting from one to the other - I'd consider that an invaluable lesson.
If you're learning a programming language, your decision about which language to learn should not be driven by whether or not the language is preinstalled and you need to go to the trouble of installing one piece of software.
"I decided to become a Prolog programmer because it was the only thing installed on my machine."
I don't see anything wrong with that logic. It's not like I'm going to be using code that I wrote while learning in the future. And it's not like learning Prolog (or Python 2) will make me unable to learn other languages in the future.
Of course it should! That's how I got started programming 17 years ago. I never would have started programming if the first thing was to find a language and pick it. I absolutely started programming because there was a language there.
(In this case, it's both javascript and c, on linux, and VBA on Windows. I use none of those today but that doesn't matter!)
I disagree. 5 mins of work to install a new programming language impacts so much of what you do with that language and how you would deploy it in production environment. As the GP says - Python 3 is the future.
> and how you would deploy it in production environment
We're talking about learning a new language, not deploying to production.
> By this logic, we should be using IE on Windows.
No, that's not what anybody said. This is about learning languages, not even using them. Using a language is different from learning a language in so many ways they aren't even comparable.
Millions of people could be learning a language for millions of reasons. Simple portability is useful - knowing a language that is preinstalled on a huge portion of computers worldwide has massive advantages for a huge number of people who are learning new languages today.
Dismissing the values that others might place in how they learn a language is being close-minded. There are lots of reasons to learn to program, and learning based on the language available to you first and most readily is certainly a reasonable approach.
Last time I tried to install python3 and pip on a Mac without root, I tried following 2 guides from the internet, both gave weird errors, and I gave up.
My "give up" was just install as root, system wide, but that's only because I have root access to my machine.
Python 3 has has become prevalent in usage around 2013-2014. I don't know anyone who is starting a Python 2 project as of now. In terms of library support, as of 2018 you get more library support on Python 3 [1]. Some new libraries coming out may still support Python 2, but many are Python 3 only. For example the latest Tensorflow is Python 3 only if you want to install it on Windows[2] and Django back in 2017 has completely removed Python 2 support [3]
>Python 3 has has become prevalent in usage around 2013-2014.
Citation needed. Back then it was at best at 20%, and even today it's not much more (source: PYPY download statistics breakdown).
>I don't know anyone who is starting a Python 2 project as of now.
I know several. Any company with lots of Python 2 projects that are not going anywhere soon (Google is one of them), is probably also starting new Python 2 projects alongside them, they won't add 2 different versions to cater to.
> Any company with lots of Python 2 projects that are not going anywhere soon (Google is one of them), is probably also starting new Python 2 projects alongside them, they won't add 2 different versions to cater to.
Citation needed.
Edit: Oh and Tensorflow for Windows is made by Google and it's Python 3.5 or higher.
> Is there something useful that's only in Python 3?
Most of the big libraries have supported both 2 and 3 for a while; that's changing soon, and not because Python 3 is dying.
IPython dropped Py 2 support in 6.x.
Django dropped support for Py 2 with Django 2.0.
Numpy drops new feature support for Python 2 at the end of this year (but will continue bugfixes for that last Py2-supporting feature release past that point), and all support for Python 2 at the end of next.
SciPy, similarly, has announced it will drop Python 2 support by 2020.
And lots of other libraries have sunsetted or announced plans to sunset Py 2 support quite soon.
Also—and a big driver—is that the Python Software Foundation has announced it will drop support for Python 2 in 2020.
Numpy drops new feature support for Python 2 at the end of this year (but will continue bugfixes for that last Py2-supporting feature release past that point), and all support for Python 2 at the end of next.
>SciPy, similarly, has announced it will drop Python 2 support by 2020.
And there's the reason I needed to convert, thank you.
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.
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.
> 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.
>> 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.
The lack of core maintenance isn't meaningless (it's true someone else could step in, but it's not clear they will in any substantial way.)
More importantly, the fact that major libraries are dropping Python 2 support is not meaningless. (Again, I suppose, it's possible that people could fork IPython, NumPy, Django, etc., from the last Py 2 supporting version and extend support, but that seems even less likely than the core language getting solid support by way of a community fork.)
Unless you discover an internal bug in Python 2 in which case it will never be fixed. Depending on the source of the bug, your options then become: (1) maintain your own patched version, (2) upgrade Python to a version where it is fixed, or (3) use something else. I would personally choose #2.
Except the community really can't and live to tell anyone about it (aside from a fringe fork), because the Python Foundation won't let them use the Python name for the fork, even though a fork is in every other way open source and labeled for maintenance purposes only.
Anyone who's every ported a very large project from 2 to 3 might end up despising the PSF for this purpose and might tend to search for a new language (Nim? Go? JS? Scala?
Ruby?!). So much for the B in BDFL..
>Except the community really can't and live to tell anyone about it (aside from a fringe fork), because the Python Foundation won't let them use the Python name for the fork
Yeah, but a name like "Cobra, a fork of Python 2.7" will do just as well, and everyone that cares enough will know what it is and where to find it.
Not really on topic but thought it interesting to see a resource from my alma mater linked here. Do you work with Dr. Patterson or did that randomly come up?
>> Why the recommendation for Learn Python 3 The Hard Way?
Specifically because even Zed Shaw - probably the most vocal and longest time objector to Python3 has moved on from recommending against Python 3. Thus now that he supports Python 3 then I think he should be supported - history is past.
Everyone with a significant industry presence has moved on from recommending against Python 3 - except Google.
> Everyone with a significant industry presence has moved on from recommending against Python 3 - except Google.
Do you have any source confirming that Google is recommending Python 2 as of 2018? Because e.g. the current installation instructions for Tensorflow recommend Python 3.5 or 3.6: https://www.tensorflow.org/install/install_windows
I've never heard of Goodkind before but this particular issue doesn't seem worth any ire. Apparently they didn't like the cover for their book, they made a joke and then apologized. They clarified that the art direction was the problem and not the composition itself.
I wouldn't recommend Shaw's stuff to anyone, but being Python 3 opponent for a long time doesn't seem like a solid point. Armin Ronacher was hating on unicode in Python 3 and writing stuff in Python 2 only long after Python 3 has "won", doesn't make him a bad programmer and such.
While he may not be a "bad programmer", it concerns some folks that people are so against moving forward to something the industry is in strong support of. I wonder what other kinds of singular opinions (or very minority at best) that could be affecting other aspects of his programming.
Python 3 is the present, we are there, Python 2 is the past and in 2 short years it will be unsupported and whatever you learned from this resource will need to be re-learned for Python 3 pretty damn quick.
Recommendation to those learning Python: avoid this Google resource and instead use Zed Shaw's "Learn Python 3 The Hard Way" https://learnpythonthehardway.org/python3/
Or you could do things Google's way and then follow up with learning how to use DOS http://people.uncw.edu/pattersone/121/labs/L1_MSDOS_Primer.p... because I believe things are heading that way.