I'm planning to spend my free time in the next couple of months learning Python, should I only learn Python 3?
Pretty much. No reason to look into Python 2 when most of the useful libraries already support Python 3, which is the point of the OP. And you'll save yourself a lot of 2-to-3 fatigue we've all been struggling with. Tip: there's a Chrome/Firefox extension to redirect all Google results from Python 2 documentation to their corresponding entries in Python 3 docs.
Most popular Python packages now support Python 3
111–120 of 166 posts
Re: Most popular Python packages now support Python 3
#112Earlier quoted context omitted.
You're claiming to know the future of Python better than "Python people" know the future of Python. Python has changed incompatibly once in 26 years, and never plans to do it again, yet you're making it sound like an ongoing pattern. What language are you going to run to that has that kind of track record?
30 years later, scheme is still scheme. A different report has come out, and some compilers choose to implement it. But the language hasn't changed. See my point?
What Scheme implementation do you use that has never broken compatibility and continues to be maintained?
Re: Most popular Python packages now support Python 3
#113Earlier quoted context omitted.
You're claiming to know the future of Python better than "Python people" know the future of Python. Python has changed incompatibly once in 26 years, and never plans to do it again, yet you're making it sound like an ongoing pattern. What language are you going to run to that has that kind of track record?
POSIX sh?
Re: Most popular Python packages now support Python 3
#114Python 3 is a case study on how you should never create a new version of a language implementation that can't load and interface with code written for the old version. After almost 10 years, the old version is still in use, and the new version isn't even that much better.
I don't know. The introduction of Python 3 caused massive headaches and fractured communities, but the alternative of dealing with unattractive warts in a language until eternity is also not very attractive. I quite like Python 3, and most of the backward-incompatible changes it introduced.
The problem is that the only significant wart that got fixed was Unicode. We still have the GIL, a very slow runtime, convoluted packaging, barely-usable lambdas, and limited typing. That's a pretty lousy payoff for 10 years and probably millions of engineer-hours.
Re: Most popular Python packages now support Python 3
#115Yup at this point there is no reason to not use Python 3 for new projects. What I'm finding actually is that some companies that have their codebase in Python 2 have actually started migrating to Golang rather than Python 3, because of the increased performance benefits. I'm kind of sad about this, but I think that Golang will eventually replace Python as the go-to back-end server language (maybe even data processing…
- Learning curve. Rust is not as bad for learning as C++, but any language with strong metaprogramming and unfamiliar or relatively new language concepts are bound to be stumbling blocks.
- Ecosystem. The Go ecosystem by and large is awesome. Rust's is getting up there, though. It'd be really cool if Mozillas work with Servo meant there would be pure Rust HTML rendering and JavaScript interpreter code though! So far, impressed with minimal but powerful libraries like Iron.
- Maturity. Rust itself is pretty good, even nightly feels stable, but the developer tools are still shaping up. Until recently, rustup crashed on my Win10. Things are a lot better today, especially with the Rust Language Server.
- Marketing. Rust has a ways to go on its marketing. This has improved recently as well and I'm glad. Some underestimate the importance of having good PR for a programming language - people need to be really confident to adopt a programming language for critical components, and Go is in a place where many would trust it just because of its reputation. Also good for convincing your coworkers to give it a shot.
That being said, while Go makes concurrency easy and generally acts as a great simplistic language to develop services in, I really feel as though Rust's potential is enormous. The 'simplicity debt' of Go can be taxing sometimes.
I still love Go, though. I am just struggling to figure out which tool to use for which jobs. Though there's large areas of overlap, there are definitely things that feel nicer in either than the other.
Re: Most popular Python packages now support Python 3
#116Earlier quoted context omitted.
I don't know. The introduction of Python 3 caused massive headaches and fractured communities, but the alternative of dealing with unattractive warts in a language until eternity is also not very attractive. I quite like Python 3, and most of the backward-incompatible changes it introduced.
but the alternative of dealing with unattractive warts in a language until eternity is also not very attractive. The problem is that the only significant wart that got fixed was Unicode. We still have the GIL, a very slow runtime, convoluted packaging, barely-usable lambdas, and limited typing. That's a pretty lousy payoff for 10 years and probably millions of engineer-hours.
Python might be making bad calls, but it's hard to criticized a process for failing to accomplish things it wasn't trying to accomplish.
Re: Most popular Python packages now support Python 3
#117Earlier quoted context omitted.
I don't think I could've survived engineering in Python without type hints. I came from a big 5 and engineering in C++ for several years and had to run a team of 5 not-so-great engineers in a python codebase. The hit that dynamic typing causes to readability, maintainability, bug risk, etc is _huge_, and type hinting goes some way towards fixing that.
Big 5?
Re: Most popular Python packages now support Python 3
#118Earlier quoted context omitted.
As someone who asked the same question a few years back (and gladly received the answer: Python 2), I'd suggest you learn both. Does not matter which language you start in, as long as you can write Python 2/3 compatible code. Perhaps starting with Python 2 (and the fantastic "LearnPythonTheHardWay") helps with this. You'll just have to unlearn a few Py2 warts like xrange and using print statements with ellipses. You…
> I'd suggest you learn both. I'd suggest OP learns Python 3 and try really hard not to look at Python 2 ever, which hopefully shouldn't be too hard in 2017. > as long as you can write Python 2/3 compatible code Maintaining a Python 2 and 3 compatible codebase in a PITA. OP wants to learn a new language, presumably to build things with it. But your advice is that they acquire insight of all the mistakes of a language…
I maintain multiple Py 2-3 compatible codebases, both academically and commercially. It's not hard, because I develop in Python 2, while writing Python 3 compatible code.
Python 2 is a beautiful language as powerful as:
import antigravity
print "Hello, world!"
There is nothing a beginner can't do in Python 2 that he/she can do in Python 3.If Python is a different language and should be treated like so, then I don't want to switch to this other language, or have a project support two different languages (I'd switch to Go if having to switch languages). For all intents and purposes: Python 2 works just fine. Google did not need Python 3 when they first released TensorFlow a year back.
> If you start a project today and make it Python 2 + 3
Then you are compatible will the largest amount of users. That's what matters to me: Somebody on a fresh install being able to pip install my library, no matter if it is Python 2.7+ or 3.4+. All other reasons are politics.
> this isn't about corporate employees or banking apps from the 90's.
No, it's about banking apps from the 00's and 10's.
Re: Most popular Python packages now support Python 3
#119Yup at this point there is no reason to not use Python 3 for new projects. What I'm finding actually is that some companies that have their codebase in Python 2 have actually started migrating to Golang rather than Python 3, because of the increased performance benefits. I'm kind of sad about this, but I think that Golang will eventually replace Python as the go-to back-end server language (maybe even data processing…
but at the same time, Python is the fastest growing language https://stackoverflow.blog/2017/09/06/incredible-growth-pyth... because of data science and AI, and I don't see Go replacing Python anytime soon in these domains.
Re: Most popular Python packages now support Python 3
#120Clicking around, those that don't seem to be: 1. Obsolete. Either explicitly so (e.g. Google API) or abandoned, without even a minor/patch release (initools, 2010) or in some cases a code commit (e.g. pathtools, 2012) for five years or more. I suspect that they will never be Py3, the community will just move on to alternatives. 2. Working hard to bring support (e.g. ansible). 3. Part of the graphite ecosystem. If the…