– … everyone, and welcome to my Why Python 3 video.
This video’s also going to serve
as the first video in my Python 3 programming tutorial series.
Though, there will be nothing more
than just information on Python 3 versus Python 2
in this video, and why you should choose Python 3.
Video two will begin with the downloading
and installation of Python 3.
Also, I’m going to mention here,
and again later on in this series, that this series is going to be geared
towards the complete noob for Python, so if you’re used to Python 2.7 already,
making the transition to Python 3 is really not that difficult.
I will probably make a Py2 to Py3 transitional video
after I finish this series,
but that’s probably a little bit away.
So on with the video.
why Python 3?
So throughout my time with Python programming,
I’ve visited and revisited the idea of Python 3 countless times.
When I first started, that’s exactly what I did.
And I’ve always come up with the exact same answer every time.
Python 3, on the whole, is not better than Python 2.
Yet it has less support documentation and libraries.
Basically, all of the good things in Python 3,
for the most part– not all of them, but a lot of them–
have actually been ported backwards into Python 2.
So more on why that might must be really frustrating later.
But anyways, a few months ago I watched a YouTube video
of a presentation about why one should choose Python 3.
It was something like why Python 3?
Trust me, it’s better.
(laughs) Something like that, right?
And it was given by an actual developer for Python 3.
Through the entire presentation–
now, given it’s probably just the case
that because I’m not an expert or a professional–
I guess professional is a bad word.
I am a professional, but I’m not an expert.
Through the entire presentation,
I was still left not really seeing any reason,
based on that presentation
and what was said in that presentation,
I saw no reason to switch, right?
But instead, I could really sense the frustration
in this guy’s voice, right?
The lack of adoption for Python 3
is actually an interesting topic of discussion.
认真的说 python 3的故事就像一部愚蠢的希腊悲剧电影
The story of Python 3 could make like a nerdy Greek tragedy movie
or something, seriously. (laughs)
Now, this stuff said, you know,
I’m not suggesting people move to Python 3 out of pity.
That’s not a very valid reason, or a good idea at all.
But there are some good reasons why you should move to Python 3.
See, Python 3 is really the future.
Python 2 is not.
If you stick with Python 2 and Python 2 only,
and everybody does this,
you’re going to be able to get away with it for a while,
不久你就会发现 使用python 2
and then you’ll find yourself using Python 2
in a time where it’s comparable to using something like Pascal today.
At the same time, Python itself will probably fall behind
as a developmental language or a programming language,
just simply due to the lack of support and community overall.
You know, Python, in my honest opinion, is simply the best language out there.
It’s very high level, yet it has incredible power.
And due to its high-level nature,
it’s also very simplistic.
It’s just a great language.
And it would be a shame to really see it become outdated
just simply because the community was disinterested in moving forward
with the language.
And, you know, I really can’t imagine
how annoying it must be for the Py3 developers,
that people just simply aren’t adopting the new language
for not too great of reasoning, in my opinion.
So in the end, the deciding factor for me
to not adopt Python 3 was the lack of documentation and support, right?
It was, when I was a noob to programming in Python,
and I really needed that support, just as anybody new to any language
needs some sort of– you need the community and the support
in order to progress in that language, right?
当时python2和3我都看了 对我来说 它们是一样的
And I looked at both languages, and to me they seemed equal.
Equal, but the community surrounding them
was very different in size,
所以作为一个初学者 选择 python 2.7 似乎比较合理
so it seemed to make sense for me, as a noob, to go with Python 2.7.
And I believe that’s a logic–
I think that was a very logical choice.
And so anybody else that’s doing the same thing,
I completely sympathize with why that is the choice at the moment.
Now that I’m someone that has had this channel and I’m making all these videos on YouTube,
I seem to be doing something right enough to where at least a decent amount of people
enjoy how I teach, and I think it’s almost somewhat
of my responsibility to share and teach Python 3 at this point.
This way, maybe in the future when someone
人们搜索python 3 vs python 2.7时
does a search for Python 3 versus Python 2.7,
maybe they’ll find my video, or maybe they’ll find stuff from people
that I helped get started, or, you know, whatever,
无论如何 python 3都会开始发展 不是吗
and Python 3 can actually start to grow, you know?
Because for the most part right now
python 3的讨论中 它们大部分的差异
when you hear a Python 3 versus Python 2 discussion,
the differences are really only geared towards, I would say the expert,
or at least professional Python developer, but I would argue most professional Python developers
couldn’t care less about these tiny differences.
And then the main question of performance:
是python 3快 还是python 2快？
Is Py3 or Py2 faster?
They are pretty much equal all the way down.
So there was, in the video from the guy,
我忘了标题 他说“相信我 python 3更好”
trust me, Py3 is better, or I forget the title,
but in that video he does compare the performance,
and depending on the task,
有时python 2更快 有时python 3更快
sometimes Py2 is faster, sometimes Py3 is faster.
The differences are so minute that performance isn’t the issue,
so it really comes down to a few
just tiny differences that, at the moment,
are so tiny that it just doesn’t make sense.
But in the future,
if Python 3 is allowed to continue growth and development,
Python 3 will be the victor.
But if, obviously, no one supports it,
then that sort of stuff is never going to happen,
and you won’t have modules and all this kind of stuff.
Back to a video like like this guy, though, by this time, that video’s kind of geared
towards at least, most likely an expert.
And by that time that Py3 makes sense
中高级开发者时 python 3就有意义了
to the expert, the developer has already gone through their noob stage,
他们或许可以对python 2和python 3做一个全面的比较
and probably did the whole Python 2 versus Python 3,
得出结论 python 2用于入门最好
decided Py2 was the best start,
and then got ingrained in their ways, right?
And then it’s very hard to get them to switch,
and a lot of people don’t see a reason to switch.
So here my goal is to offer a full slew
of beginner and partially intermediate Python tutorials,
all using Python 3.
So my Python 2.7 tutorials will remain here.
I’m not going to delete them or anything,
but I’m going to be doing my best to offer
the same topics, only in Python 3.
And some modules that are pretty popular in Python 2
still aren’t available in Python 3,
so we can work on at least probably covering
at least one of those modules as far as how you could port them,
because really porting them isn’t that big of a deal.
Some of them are harder than others.
But anyway, this way, hopefully you’ll be able to get through
that noob and intermediate stage of learning Python,
and you’ll be able to do it with Python 3.
带着这个信念 我们开始python 3的学习吧
So with that, let’s go ahead and start Python 3.
As always, everyone, thanks for watching.
Thanks for all the support and subscriptions.
Until the next video.
为什么用Python3？Py2 vs Py3