2.3.2 保留的标识符类型 Reserved classes of identifiers

Certain classes of identifiers (besides keywords) have special meanings. These classes are identified by the patterns of leading and trailing underscore characters:

(关键字以外的)某些类型的标识符具有特殊的含义, 如下:

_*
Not imported by "from module import *". The special identifier "_" is used in the interactive interpreter to store the result of the last evaluation; it is stored in the __builtin__ module. When not in interactive mode, "_" has no special meaning and is not defined. See section 6.12, ``The import statement.''

不能通过" from moduls import *"导入。 特定标识符"_"在交互式解释器用于存储上次估值的结果. 它位于__buildin__模块之中. 在非交互方式时,"_"没有特殊含义, 且是未定义的

Note: The name "_" is often used in conjunction with internationalization; refer to the documentation for the gettext module for more information on this convention.

__*__
System-defined names. These names are defined by the interpreter and it's implementation (including the standard library); applications should not expect to define additional names using this convention. The set of names of this class defined by Python may be extended in future versions. See section 3.3, ``Special method names.''

系统定义的名字

__*
Class-private names. Names in this category, when used within the context of a class definition, are re-written to use a mangled for to help avoid name clashes between ``private'' attributes of base and derived classes. See section 5.2.1, ``Identifiers (Names).''

类私有名字