• shell What I have here is a Python shell, and I'm going to just show you some simple examples of how we start building expressions.

    好,这是一个Python的,我会给大家看一些,关于写表达式的简单的例子。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • Python You can pick up another language in a week, couple of weeks at most, once you know how to do Python.

    只要学会了,你可以在一周之内学会任意一种语言,最多两周。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • Strings are captured in Python with an open quote and some sequence of characters followed by a closed quote.

    字符串在Python中,是以一个开引号开始,然后后面是一系列的字符,以一个尾引号结束。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • This is a keyword to Python that says, when it reads this in the file, it says, I'm creating a definition.

    这是Python语言的关键词,当你在文件中读到这个词的时候,它的意思就是我正在创建一个定义。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • Which is, and we're going to do some examples of this, initially we just typed in expressions Python into the interpreter; that is,directly into Python And as I suggested last time, the interpreter is actually a program inside of the machine that is basically following the rules we're describing here to deduce the value and print it up.

    也就是,我们将会对这一点讲解一些例子,一开始我们只是简单的把表达式输入,到解释器里面去,也就是直接传给,我上次跟大家讲过,解释器实际上是,机器内置的,按照我们描述的规则,来推算出结果值并把值显示出来的一个东西。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • Later in the term, we'll see why we have this syntax and why it wasn't just a totally arbitrary Python brain-dead decision by the designers of Python, and many languages before Python, but in fact is a pretty sensible thing.

    这个学期的晚些时候,我们会去学学我们学这些语法的原因,以及这些语法其实并不是,和以前其他语言的设计者,一拍脑子做出的决定,实际上制定这些语法其实是相当明智的。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • Well, basically because it was a design choice when the creators of Python decided to create the language, they basically said, we're always going to have an explicit pointer to the instance.

    好,基本上来说这是因为,这是当Python的创造者,决定创造这门语言的时候,的一个设计决定,他们主要的说了说,我们要有一个明确的,指向实例的指针。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • OK. In order to talk about Python and languages, I want to do one last thing to set the stage for what we're going to do here, and that's to talk about the different dimensions of a language.

    好,为了谈论Python语言以及其他,我想做,最后一点儿准备,那就是讨论一种语言的,不同维度。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • Associated with every data type in Python is a type, which identifies the kind of thing it is.

    Python中每种类型都对应着一种数据类型,类型确定了对象的种类。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • These are instances of a class, and associated with that class are a set of methods things that I can deal with.

    但是Python的基本思想是相同的,这是一些一个类的实例,这个类关联了一个方法集,我可以做的一些操作。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • Most of the time, we're going to be doing expressions inside of some piece of code, inside of a script, which is the Python word for program.

    大多数情况下,我们会在一些代码内部,写一些表达式,在一个脚本里面,也就是Python里面对程序的另一种叫法。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • All right. If that sounds like a really long preamble, it is. Let's start with Python.

    好,如果上面听起来像一个很长的序文,他确实是,让我们从Python开始。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • That's the Python saying, that is a command, that is a specific command to get the value of the expression and print it back out.

    这代表着Python告诉我们这是一个命令,这是一个,得到表达式的值,并显示的特殊命令。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • Because in doing that, Python would then have a value that it could pass on into some other part of a computation, and if it wasn't what I wanted, I might be a long ways downstream in the computation before I actually hit some result that makes no sense.

    因为如果这样做的话,Python会将,输入的值传递到下面的,一些运算中去,如果这个值的类型不是我想要的,我可能会在得到,一个毫无意义的结果之前,经历一个很长时间的,计算过程。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • In Python, it'll find it, I think one bug at a time, right John?

    Python中,它会找到它的,我觉得一回能找一个漏洞,对么John?

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • Well, I call class just like a function, and you can see that below.

    也就是pass了,在python中它的意思就是说。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • This is a mistake I make all the time in Python.

    在编写Python语言的时候我总是犯这个错误。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • OK, you've actually seen exceptions a lot, you just didn't know that's what they were, because exceptions show up everywhere in Python. Let me give you a couple of examples.

    好的,你们实际以及看过很多异常了,你就是不知道这些是什么,因为异常在Python中随处可见,我给你举些例子。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • Which is really a shame.

    很不幸,Python没有提供这个功能。

    麻省理工公开课 - 计算机科学及编程导论课程节选

$firstVoiceSent
- 来自原声例句
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定