盘点一下编程中的常见术语。方便大家记忆,建议整理收藏。
1.function: A named sequence of statements that performs some useful operation. Functions
may or may not take arguments and may or may not produce a result.
函数:一系列有序语句的组合,有自己的名字,并且用在某些特定用途。可以要求输入参数,也可以没有参数,可以返回值,也可以没有返回值。
2.function definition: A statement that creates a new function, specifying its name, parameters,
and the statements it contains.
函数定义:创建新函数的语句,确定函数的名字,形式参数,以及函数内部的语句。
3.function object: A value created by a function definition. The name of the function is a
variable that refers to a function object.
函数对象:由函数定义所创建的值,函数名字指代了这一函数对象。
4.header: The first line of a function definition.
函数头:函数定义的第一行。
5.body: The sequence of statements inside a function definition.
函数体:函数定义内部的一系列有序语句。
6.parameter: A name used inside a function to refer to the value passed as an argument.
形式参数:用来在函数内部接收实际参数传来的值,并被函数在函数内部使用。
7.function call: A statement that runs a function. It consists of the function name followed by an
argument list in parentheses.
函数调用:运行某个函数的语句。包括了函数的名字以及括号,括号内放函数需要的实际参数。
8.argument: A value provided to a function when the function is called. This value is assigned
to the corresponding parameter in the function.
实际参数:当函数被调用的时候,提供给函数的值。这个值会被函数接收,赋给函数内部的形式参数。
9.local variable: A variable defined inside a function. A local variable can only be used inside
its function.
局部变量:函数体内定义的变量。局部变量只在函数内部有效。
10.return value: The result of a function. If a function call is used as an expression, the return
value is the value of the expression.
返回值:函数返回的结果。如果一个函数调用被用作了表达式,这个返回值就是这个表达式所代表的值。
11.fruitful function: A function that returns a value.
有返回值函数:返回一个值作为返回值的函数。
12.void function: A function that always returns None.
无返回值函数:不返回值,只返回一个空 None 的函数。
13.None: A special value returned by void functions.
空值:无返回值函数所返回的一种特殊的值。
14.import statement: A statement that reads a module file and creates a module object.
导入语句:读取模块并且创建一个模块对象的语句。
15.module object: A value created by an import statement that provides access to the values
defined in a module.
模块对象:导入语句创建的一个值,允许访问模块所定义的值。
16.dot notation: The syntax for calling a function in another module by specifying the module
name followed by a dot (period) and the function name.
点符号:调用某一个模块的某一函数的语法形式,就是模块名后加一个点,也就是英文的句号,再加函数名。
17.composition: Using an expression as part of a larger expression, or a statement as part of a
larger statement.
组合:把表达式作为更大的表达式的一部分,或者把语句作为更大语句的一部分。
18.flow of execution: The order statements run in.
运行流程:语句运行的先后次序。
19.stack diagram: A graphical representation of a stack of functions, their variables, and the
values they refer to.
栈图:对函数关系、变量内容及结构的图形化表示。
20.frame: A box in a stack diagram that represents a function call. It contains the local variables
and parameters of the function.
框架:栈图中的方框,表示了一次函数调用。包括函数的局部变量和形式参数。
21.traceback: A list of the functions that are executing, printed when an exception occurs.
追踪:对运行中函数的列表,当有异常的时候就会输出。
22.method: A function that is associated with an object and called using dot notation.
方法:某个类中一个对象所具有的函数,用点连接来进行调用。
23.loop: A part of a program that can run repeatedly.
循环:程序中重复运行的一部分。
24.encapsulation: The process of transforming a sequence of statements into a function
definition.
封装:把一系列相关的语句整理定义成一个函数的过程。
25.generalization: The process of replacing something unnecessarily specific (like a number)
with something appropriately general (like a variable or parameter).
泛化:把一些不必要的内容用更广泛通用的内容来替换掉的过程,比如把一个数字替换成了一个变量或者参数。
26.keyword argument: An argument that includes the name of the parameter as a “keyword”.
关键词参数:一种特殊的实际参数,把形式参数的名字作为关键词包含在内。
27.interface: A description of how to use a function, including the name and descriptions of the
arguments and return value.
交互接口:对如何使用一个函数的描述,包括了函数名,以及对实际参数和返回值的描述。
28.refactoring: The process of modifying a working program to improve function interfaces and
other qualities of the code.
重构:对一份能工作的程序进行修改,改进函数交互接口以及提高代码其他方面质量的过程。
29.development plan: A process for writing programs.
开发计划:写程序的过程。
30.docstring: A string that appears at the top of a function definition to document the function’s
interface.
文档字符串:一个在函数定义的顶部的字符串,讲解函数的交互接口。
31.precondition: A requirement that should be satisfied by the caller before a function starts.
前置条件:函数开始之前,调用者应当满足的要求。
32.postcondition: A requirement that should be satisfied by the function before it ends.
后置条件:函数结束之前应该满足的一些要求。
33.module: A file that contains a collection of related functions and other definitions.
模块:包含一系列相关函数以及其他一些定义的文件。
我们是Greaterwms软件开发团队。
项目介绍:
我们的产品是开源仓储管理软件,荣获gitee最有价值开源项目奖,评选为GVP项目
产品支持多仓,波次发货,合并拣货,Milk-Run等业务模型。前后端分离为完全开源项目。
软件著作权编号:2018SR517685
GitHub地址:github
Gitee地址: gitee
视频教程: bilibili
Demo地址:DEMO
商务联系:mail@56yhz.com
技术交流:GreaterWMS-01(加微信进群)