217 points · by ShouldNotBeHere · 8y ago · 119 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.
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..
Is there something useful that's only in Python 3?
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.
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.
> Originally created during the Python 2.4 days, we've tried to keep the content universal and exercises relevant, even for newer releases. As mentioned on the setup page, this material covers Python 2. While we recommend "avoiding" Python 3 for now, recognize that it is the future, as all new features are only going there.
Edit: On a related note, I don't think python is a very good first language, despite it being my absolute favorite, because it uses kind of a mishmash of paradigms.
What language would you say is a good first language? To me, Python seems very readable to a new programmer without having a capability/tooling ceiling that you will eventually reach, which seem to make it a decent choice.
Furthermore I do not believe that the rate of change will stop in several lifetimes.
On how old computing is, automated computing using punch cards was invented in the 1800s. "Programmer" has been a viable job title since WW II. Essays about programming written 50 years ago are still relevant today.
On how much things change, that depends on your environment. Across the hall from me there is a company of COBOL programmers. A lot of what they need to know hasn't changed since before I was born. Sitting next to me are people implementing code in node.js with react. Most of the libraries and best practices that they are trying to follow were invented in the last 10 years. I'm maintaining a legacy project that isn't using any technology less than 10 years old. The experience of how much things change is highly dependent on what exactly you are doing.
However I'm minded of what my sister said about nursing. When she started as a nurse she was told that on average half of what she knew would be out of date in 10 years. This is why nurses need continual retraining. This was ridiculous to her. But guess what? When she retired it was true, every 10 years about half of what she knew went out of date! Between new research, new technologies, new best practices and so on, nursing never stopped changing. And hasn't stopped changing since modern nursing was invented in the 1800s.
If a profession so much older than ours shows such sustained change, and our profession has shown an extended sustained rate of change, why would I expect this to change? The truth is that I don't. Sustained change is more the rule than the exception in technology, and none of the fundamental reasons why have changed.
Some knowledge is core - the ways that programmers get defensive and have trouble accepting their own bugs and mistakes has not changed since before I was born - and others change constantly. Learn the principles. Learn what is core. And be prepared to continue learning trivia forever because programming is continuing to change.
The difficult engineering problems in the world aren't greenfield engineering.
The idea of data being encoded should be an extremely high level idea, with foundations that are supported by the internal libraries and maybe even compiler.
I feel that golang has a much more data-structure friendly view of Unicode.
* The ancient paradigm of bytes remains
* Strings are immutable sequences of bytes; but are trivial to cast back and forth.
* 'runes' (distinct Unicode code points) also exist
However to actually validate or do anything fancy to a Unicode sequence a programmer would need libraries from https://godoc.org/golang.org/x/text which shows how truly complex /proper/ handling of Unicode data is; instead of just the simple copy / append / search (is this inside of / a match to it) operations that make up 99% of my handling of Unicode data.But I agree, making unicode part of the language is very dumb. I just wish they would give up as it has never been good.
I seriously cannot tell if this is a joke or not.
And if you're going to port, it's not a question 2 vs 3, it's a question of 3 versus many other languages, chiefly Go.
The writing is on the wall for py2 at Google, and in some ways it has been for years.
Sure it's mostly outdated, but it really clicked for me. Nick Parlante does a great job, and his codingbat.com was the perfect step 2.
First Lecture. https://www.youtube.com/watch?v=tKTZoB2Vjuk
I took a couple C classes in college that were geared for people who already knew how to program and hated it. Never wanted to think about it again.
Those videos helped abstract a lot of the low level muck away and build real stuff. Once I was able to understand some of these concepts and why you would actually use them I could go back and learn all the things that were too deep in the weeds to understand.
Its a bit dated now but still some of the best training videos I've seen.
> https://www.udacity.com/courses/all
It's an interesting mix of empowering the learner and getting the learner to use Google products (e.g. you finally make that Android app, you learn how to iterate development, gain traction with users, grow). I wonder to what extent learning from the resources can bring up to parity with a Google developer.
Some years ago in a googs search box i searched for some flag for 'python3 itertools' and googs immediately took me to a subdomain saying, 'does this sort of thing interest you? This is the kind of work we do here at the goog.' then something to the effect of enter your email and answer some obscure python question
Out of curiosity I answered the first few questions but after about four I was more bothered than intrigued and closed the tab and redid the search and this time googs gave me the results I was looking for
It was the only time it's ever happened to me..
Has anyone else ever seen this?
https://thehustle.co/the-secret-google-interview-that-landed...