@@ -1207,6 +1207,9 @@ msgid ""
12071207":meth:`~socket.socket.makefile` method of socket objects (and perhaps by "
12081208"other functions or methods provided by extension modules)."
12091209msgstr ""
1210+ ":term:`file object` 表示一个打开的文件。有多种快捷方式可用来创建文件对象: :func:`open` 内置函数,以及 "
1211+ ":func:`os.popen`, :func:`os.fdopen` 和 socket 对象的 "
1212+ ":meth:`~socket.socket.makefile` 方法 (还可能使用某些扩展模块所提供的其他函数或方法)。"
12101213
12111214#: ../../reference/datamodel.rst:866
12121215msgid ""
@@ -1215,21 +1218,24 @@ msgid ""
12151218"and error streams; they are all open in text mode and therefore follow the "
12161219"interface defined by the :class:`io.TextIOBase` abstract class."
12171220msgstr ""
1221+ "``sys.stdin``, ``sys.stdout`` 和 ``sys.stderr`` "
1222+ "会初始化为对应于解释器标准输入、输出和错误流的文件对象;它们都会以文本模式打开,因此都遵循 :class:`io.TextIOBase` "
1223+ "抽象类所定义的接口。"
12181224
12191225#: ../../reference/datamodel.rst:1108
12201226msgid "Internal types"
1221- msgstr ""
1227+ msgstr "内部类型 "
12221228
12231229#: ../../reference/datamodel.rst:877
12241230msgid ""
12251231"A few types used internally by the interpreter are exposed to the user. "
12261232"Their definitions may change with future versions of the interpreter, but "
12271233"they are mentioned here for completeness."
1228- msgstr ""
1234+ msgstr "某些由解释器内部使用的类型也被暴露给用户。它们的定义可能随未来解释器版本的更新而变化,为内容完整起见在此处一并介绍。 "
12291235
12301236#: ../../reference/datamodel.rst:945
12311237msgid "Code objects"
1232- msgstr ""
1238+ msgstr "代码对象 "
12331239
12341240#: ../../reference/datamodel.rst:884
12351241msgid ""
@@ -1243,6 +1249,10 @@ msgid ""
12431249"immutable and contain no references (directly or indirectly) to mutable "
12441250"objects."
12451251msgstr ""
1252+ "代码对象表示 *编译为字节的* 可执行 Python 代码,或称 "
1253+ ":term:`bytecode`。代码对象和函数对象的区别在于函数对象包含对函数全局对象 (函数所属的模块) "
1254+ "的显式引用,而代码对象不包含上下文;而且默认参数值会存放于函数对象而不是代码对象内 "
1255+ "(因为它们表示在运行时算出的值)。与函数对象不同,代码对象不可变,也不包含对可变对象的引用 (不论是直接还是间接)。"
12461256
12471257#: ../../reference/datamodel.rst:909
12481258msgid ""
0 commit comments