K
K
kiRach2010-11-20 00:23:11
Python
kiRach, 2010-11-20 00:23:11

Which version to start learning python with?

Finally, my internal torments of choosing the technology that I want to start studying have ended.

Based on reading many posts, questions and answers, blogs, etc. came to the conclusion that it would be Python. And django in perspective.

And, accordingly, I was puzzled by the choice of literature. On Habré, according to my observation, the majority advises the book “Learning Python” by Mark Lutz. But there is one thing: only the 3rd edition of the book has been translated into Russian (but I still want to read it in my native language), it discusses the second Python. There is a more recent book, "Python 3 Programming. The Definitive Guide" ( ozone ), which deals with just the 3rd version of Python. Also, I saw opinions that it is worth starting the study with the second version, since the third one is still damp (but maybe this opinion is already outdated, I don’t know).

So I faced a dilemma: to study according to a newer, but not verified book, and immediately absorb all the innovations and advantages of the new version. Or read a proven book, albeit on an older, but proven version of python'a? Moreover, after looking at the official website, I realized that both branches are supported (and it says: if you don’t know what to choose, choose the 2nd version).

Answer the question

In order to leave comments, you need to log in

13 answer(s)
D
DMinsky, 2010-11-20
@kiRach

Start over) i.e. in the second branch. The third version is not raw, but very, very working and stable. The problem is not in the branch itself, but in the infrastructure, as long as there are a lot of libraries on the 2nd version of Python and no one will transfer them to the 3rd version in the near future, this simply does not make practical sense. And as said above, the differences are actually much smaller than many people imagine. Regarding the book, I think Lutz is advised only because there is nothing else in Russian. In fact, the book, although intelligible, is so necessary ... words cannot convey. For ~ 850 pages of code, it will be typed in total, 200 lines maximum. It is intended rather for beginners in programming in general. But on bezrybe (Russian-speaking) and cancer fish. And even so, learn English, in development without knowing it, there is nothing special to do.

E
el777, 2010-11-20
@el777

2.6

A
Anton Korzunov, 2010-11-20
@kashey

Now 90 (99?)% of the python is the second branch.
You can transfer the code from the second to the third version with scripts (given along with the python) - it translates almost 100% of the scripts (although, of course, with luck)
According to rumors, branch two soon stops developing.
At the same time, under the third - now there is simply no shit (in comparison)

M
MikhailEdoshin, 2010-11-20
@MikhailEdoshin

Is this a thick Talmud such Lutz? :) I didn't have the patience to read it. In my opinion, the best documentation is the Python tutorial on the Python site itself.

R
ring0za, 2014-04-06
@ring0za

Yes, everyone advises Lutz, but if you master the syntax, then there is nothing more useful than practice in the console. And it’s even better to study the documentation, there are a lot of interesting things there, I recently opened collections with their Counter. You just need to take it and look in the documentation, because the site says "Keep it under your pillow".

W
Wott, 2010-11-20
@Wott

I recently took up python and found the 3rd one more enjoyable. But there are support issues (for example in GAE 2.5 and django will support 3 from the next major release).
The difference between 2 and 3 is not essential to understand. But the style in the 3rd is different. If you get used to writing under 2, then you will have to relearn, but code under 3 usually works under 2 as well. In extreme cases, there is from __future__.

K
kmike, 2010-11-20
@kmike

On pypi, 97-98% of packages (I looked now, the figure is not from the bulldozer) do not work with python 3. Most of the new emerging libraries also do not support python 3, so the 98% figure does not change quickly. Almost all "big" libraries do not work with python 3 - especially those for the web (including django, Pylons and twisted), and are unlikely to work with it in the near future.
If you want to effectively use your knowledge in practice in the next couple of years, then learn the 2nd python. A lot of things can change wildly in a couple of years, and there is simply no point in learning something like that in advance.

D
deex, 2010-11-20
@deex

Why is knowledge of Python necessary?
I started studying the third version right away, because I liked the language itself, its beauty and convenience, and the third version is much more in line with its own ideology, in comparison with the second.
And I teach from the book for 2.6, only occasionally looking here diveintopython3.org/porting-code-to-python-3-with-2to3.html and in Google. In this way, I learn the main differences, which allows me to know by eye where the code is in 2.6, and where in 3.
Besides, can't I really write something in 2.6 by studying 3.1?

S
SeTeM, 2010-11-20
@SeTeM

In the summer, the question was also: “3rd branch or 2nd?”, But I liked the third one more (much more). It is more beautiful, clearer, more pleasant (this is all my opinion). After I started to understand the 3rd branch well, I read a few articles about the differences between the 2nd and 3rd branches. Thus, it doesn’t really matter to me what exactly to write on, but I have my own preferences :)
Taught by “Mark Summerfield - Programming in Python 3. A detailed guide.”
I highly recommend: a huge number of examples, competent code, light text style. After reading the first chapter "Python's Golden Reserve", which consists of eight "components", you can easily write the simplest, but no longer useless programs.
I also used the official documentation along the way, without it it is very difficult)

N
nikkar, 2010-11-20
@nikkar

And I advise you to buy a book in English. :)

C
charon, 2010-11-20
@charon

learn how you want - all books in Russian about Python are born obsolete. The language is extremely dynamic and there is always something new. Now in production, mainly the second branch is used, the latest available version. The third is still exotic.

A
alxpy, 2015-01-28
@alxpy

I think it's better to start with version 3 and here's why - alxpy.com/killer-features-of-python-3

F
fdrwitch, 2016-08-27
@fdrwitch

I highly recommend the third one. It's already three-dot-five in the yard. The scissors of the difference between twos and threes are growing and growing. This is especially evident at three-five, when, not without the participation of domestic gurus, asynchronous event programming received a new solution ..... After 13-14, when thick applications began to be rewritten to the third branch, it became clear that "Guido has a goldfish in his hands" .... The community gets drive, coolness and just-fo-fun from the development of the language.... -- LUCKY!!! Asinkio and aveit will enter the three-seven as ki-i-words. Now three-five mainstream, then three-seven then four-nil!!! And this is 18-20 - where and where are the doubles??? And libraries - they will be rewritten (from scratch), because there is already another python programming in the yard ....

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question