ADM-201 dump PMP dumps pdf SSCP exam materials CBAP exam sample questions

为什么用Python3?Py2 vs Py3 – 译学馆
未登陆,请登陆后再发表信息
最新评论 (0)
播放视频

为什么用Python3?Py2 vs Py3

Why Python 3? Python 2 vs Python 3

大家好 欢迎观看本视频:为什么使用python3
– … everyone, and welcome to my Why Python 3 video.
本视频也是我录制的
This video’s also going to serve
python3编程指导系列课程第一课
as the first video in my Python 3 programming tutorial series.
本节没有多少内容
Though, there will be nothing more
只有python3相比于python2多出的内容
than just information on Python 3 versus Python 2
以及为什么你要选择用python3
in this video, and why you should choose Python 3.
第二节课程会以python3
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
python新手准备的 所以说如果你用过python2.7
towards the complete noob for Python, so if you’re used to Python 2.7 already,
那么过渡到python3就很容易了
making the transition to Python 3 is really not that difficult.
完成这个系列课程后 我可能也会做一期
I will probably make a Py2 to Py3 transitional video
从python2向python3过渡的课程
after I finish this series,
但时间可能会比较靠后了
but that’s probably a little bit away.
我们继续本节课程
So on with the video.
为什么要用python3?
why Python 3?
在我的python编程生涯中
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.
总的来说 python3并不比python2好
Python 3, on the whole, is not better than Python 2.
没错 python3的文档及支持的库更少
Yet it has less support documentation and libraries.
基本上 python3中所有好的特性
Basically, all of the good things in Python 3,
不是全部而是大部分
for the most part– not all of them, but a lot of them–
都已经被加入到python2中了
have actually been ported backwards into Python 2.
这可能会非常令人沮丧
So more on why that might must be really frustrating later.
几个月前 我在youtube看了一个视频
But anyways, a few months ago I watched a YouTube video
它说明了我们要用python3的理由
of a presentation about why one should choose Python 3.
视频中所讲的就像是:为什么要用python3呢?
It was something like why Python 3?
相信我 它更好
Trust me, it’s better.
(笑声)就像这样
(laughs) Something like that, right?
这是一个python3开发者给出的理由
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,
我仍找不到转换到python3的理由
I saw no reason to switch, right?
相反 我能感受到
But instead, I could really sense the frustration
那个人声音中显示出的挫败感
in this guy’s voice, right?
有关python 3使用率低的问题
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,
我不建议人们因为同情而用python 3
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.
但是仍有一些你应转换到python 3的理由
But there are some good reasons why you should move to Python 3.
python 3是未来的趋势
See, Python 3 is really the future.
而python 2不是
Python 2 is not.
如果你坚持用并且只用python 2
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
就像现在使用Pascal等语言一样
in a time where it’s comparable to using something like Pascal today.
同时 作为一门发展的语言或者说编程语言
At the same time, Python itself will probably fall behind
python自身也会停滞不前
as a developmental language or a programming language,
总的来说 只是因为缺少支持的文档与库以及社区的不活跃
just simply due to the lack of support and community overall.
说实话 python是最好的语言
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
这对python 3开发者来说是一件多么沮丧的事
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.
所以最终促使我不使用python 3的理由是
So in the end, the deciding factor for me
它缺少文档及支持的库
to not adopt Python 3 was the lack of documentation and support, right?
没错 在我刚接触python编程时
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.
现在我在youtube上做这个频道 并且录制了所有这些视频
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
我认为分享和教授python 3是我的责任
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?
目前在对python 2与
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,
或者职业python开发者而言的 但是我认为大多数的职业python开发者
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,
如果python 3能继续成长和发展的话
if Python 3 is allowed to continue growth and development,
python 3会是胜者
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.
所以……
So…
我们继续说刚才那个视频 那个视频基本上是
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,
它们全部使用python 3
all using Python 3.
我的python 2.7教程还在这
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
用python 3提供同样的教程
the same topics, only in Python 3.
python 2中有些非常流行的模块
And some modules that are pretty popular in Python 2
还不支持python 3
still aren’t available in Python 3,
只要你能转换到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,
把这些模块转换到python 3不是什么大问题
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
python学习的初中级阶段
that noob and intermediate stage of learning Python,
你一定可以用pythpn 3做到
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和python2做了一个大概的比较,并说明了使用python3的理由

听录译者

收集自网络

翻译译者

[B]hugue

审核员

审核团O

视频来源

https://www.youtube.com/watch?v=oVp1vrfL_w4

相关推荐