在实践中,类定义中的语句通常都是函数定义,不过其他的一些语句也被允许,一些时候还会很有用——我们之后会来说明这些。
In practice the statements inside a class definition will usually be function definitions but other statements are allowed and sometimes useful - we'll come back to this later.
习惯上,类定义语句的内容通常是函数定义,不过其它语句也可以,有时会很有用——后面我们再回过头来讨论。
In practice, the statements inside a class definition will usually be function definitions, but other statements are allowed, and sometimes useful — we'll come back to this later.
函数定义:创建新函数的语句,确定函数的名字,形式参数,以及函数内部的语句。
A statement that creates a new function, specifying its name, parameters, and the statements it contains.
模块可以像函数定义一样包含执行语句。这些语句通常用于初始化模块。
A module can contain executable statements as well as function definitions.
模块可以像函数定义一样包含执行语句。这些语句通常用于初始化模块。
A module can contain executable statements as well as function definitions.
应用推荐