by andrewstuart · 8y ago · 0 comments
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.
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.
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.
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.
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?
[1]: https://stackoverflow.blog/2017/09/06/incredible-growth-pyth...
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.
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.
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.
The new name, for what it's worth, is Tauthon: https://github.com/naftaliharris/tauthon
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 new name, for what it's worth, is Tauthon: https://github.com/naftaliharris/tauthon
Thanks.
> 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.
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.
Not cool, and not true either.
Python dev team get to decide - have already decided - when they stop supporting Python 2.
Anyone can just it as long as they want, but, of course, without official support.
I'm quite happy that some other people were discouraged from misappropriating the name Python 2.8, as that way much confusion lies.
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 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.
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.
"I decided to become a Prolog programmer because it was the only thing installed on my machine."
(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!)
if only..
By this logic, we should be using IE on Windows.
Is there something useful that's only in Python 3?
[1] https://python3wos.appspot.com/
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.
Is it that it is more consistent in places?
No more long type
Division that works as expected
Annotations
No more xrange, iteritems etc, instead you get iterators everywhere
f-strings
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.
Going from knowing Python 2 to 3 is far easier than going from not knowing Python or programming at all to knowing Python 3.
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 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.
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.)
Or the community -- including companies with huge resources and lots of Python 2 code -- will just fork 2.7 and fix it.
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..