@@ -20,7 +20,7 @@ msgid ""
2020msgstr ""
2121"Project-Id-Version : Python 3.12\n "
2222"Report-Msgid-Bugs-To : \n "
23- "POT-Creation-Date : 2023-10-20 14:13+0000\n "
23+ "POT-Creation-Date : 2023-11-10 14:13+0000\n "
2424"PO-Revision-Date : 2021-06-28 00:47+0000\n "
2525"
Last-Translator :
Freesand Leo <[email protected] >, 2023\n "
2626"Language-Team : Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
@@ -2246,10 +2246,21 @@ msgstr ""
22462246":keyword:`if`、:keyword:`while` 或 :keyword:`for`。"
22472247
22482248#: ../../glossary.rst:1134
2249+ msgid "static type checker"
2250+ msgstr "static type checker -- 静态类型检查器"
2251+
2252+ #: ../../glossary.rst:1136
2253+ msgid ""
2254+ "An external tool that reads Python code and analyzes it, looking for issues "
2255+ "such as incorrect types. See also :term:`type hints <type hint>` and the "
2256+ ":mod:`typing` module."
2257+ msgstr ""
2258+
2259+ #: ../../glossary.rst:1139
22492260msgid "strong reference"
22502261msgstr "strong reference -- 强引用"
22512262
2252- #: ../../glossary.rst:1136
2263+ #: ../../glossary.rst:1141
22532264msgid ""
22542265"In Python's C API, a strong reference is a reference to an object which is "
22552266"owned by the code holding the reference. The strong reference is taken by "
@@ -2259,7 +2270,7 @@ msgstr ""
22592270"在 Python 的 C API 中,强引用是指为持有引用的代码所拥有的对象的引用。 在创建引用时可通过调用 :c:func:`Py_INCREF` "
22602271"来获取强引用而在删除引用时可通过 :c:func:`Py_DECREF` 来释放它。"
22612272
2262- #: ../../glossary.rst:1142
2273+ #: ../../glossary.rst:1147
22632274msgid ""
22642275"The :c:func:`Py_NewRef` function can be used to create a strong reference to"
22652276" an object. Usually, the :c:func:`Py_DECREF` function must be called on the "
@@ -2269,15 +2280,15 @@ msgstr ""
22692280":c:func:`Py_NewRef` 函数可被用于创建一个对象的强引用。 通常,必须在退出某个强引用的作用域时在该强引用上调用 "
22702281":c:func:`Py_DECREF` 函数,以避免引用的泄漏。"
22712282
2272- #: ../../glossary.rst:1147
2283+ #: ../../glossary.rst:1152
22732284msgid "See also :term:`borrowed reference`."
22742285msgstr "另请参阅 :term:`borrowed reference`。"
22752286
2276- #: ../../glossary.rst:1148
2287+ #: ../../glossary.rst:1153
22772288msgid "text encoding"
22782289msgstr "text encoding -- 文本编码格式"
22792290
2280- #: ../../glossary.rst:1150
2291+ #: ../../glossary.rst:1155
22812292msgid ""
22822293"A string in Python is a sequence of Unicode code points (in range "
22832294"``U+0000``--``U+10FFFF``). To store or transfer a string, it needs to be "
@@ -2286,23 +2297,23 @@ msgstr ""
22862297"在Python中,一个字符串是一串 Unicode 代码点(范围为 ``U+0000``--``U+10FFFF``)。 "
22872298"为了存储或传输一个字符串,它需要被序列化为一串字节。"
22882299
2289- #: ../../glossary.rst:1154
2300+ #: ../../glossary.rst:1159
22902301msgid ""
22912302"Serializing a string into a sequence of bytes is known as \" encoding\" , and "
22922303"recreating the string from the sequence of bytes is known as \" decoding\" ."
22932304msgstr "将一个字符串序列化为一个字节序列被称为 \" 编码\" ,而从字节序列中重新创建字符串被称为 \" 解码\" 。"
22942305
2295- #: ../../glossary.rst:1157
2306+ #: ../../glossary.rst:1162
22962307msgid ""
22972308"There are a variety of different text serialization :ref:`codecs <standard-"
22982309"encodings>`, which are collectively referred to as \" text encodings\" ."
22992310msgstr "有各种不同的文本序列化 :ref:`编码器 <standard-encodings>` ,它们被统称为 \" 文本编码格式\" 。"
23002311
2301- #: ../../glossary.rst:1160
2312+ #: ../../glossary.rst:1165
23022313msgid "text file"
23032314msgstr "text file -- 文本文件"
23042315
2305- #: ../../glossary.rst:1162
2316+ #: ../../glossary.rst:1167
23062317msgid ""
23072318"A :term:`file object` able to read and write :class:`str` objects. Often, a "
23082319"text file actually accesses a byte-oriented datastream and handles the "
@@ -2315,18 +2326,18 @@ msgstr ""
23152326"``'w'``)打开的文件、:data:`sys.stdin`、:data:`sys.stdout` 以及 :class:`io.StringIO` "
23162327"的实例。"
23172328
2318- #: ../../glossary.rst:1169
2329+ #: ../../glossary.rst:1174
23192330msgid ""
23202331"See also :term:`binary file` for a file object able to read and write "
23212332":term:`bytes-like objects <bytes-like object>`."
23222333msgstr ""
23232334"另请参看 :term:`binary file` 了解能够读写 :term:`字节类对象 <bytes-like object>` 的文件对象。"
23242335
2325- #: ../../glossary.rst:1171
2336+ #: ../../glossary.rst:1176
23262337msgid "triple-quoted string"
23272338msgstr "triple-quoted string -- 三引号字符串"
23282339
2329- #: ../../glossary.rst:1173
2340+ #: ../../glossary.rst:1178
23302341msgid ""
23312342"A string which is bound by three instances of either a quotation mark (\" ) "
23322343"or an apostrophe ('). While they don't provide any functionality not "
@@ -2338,11 +2349,11 @@ msgid ""
23382349msgstr ""
23392350"首尾各带三个连续双引号(\" )或者单引号(')的字符串。它们在功能上与首尾各用一个引号标注的字符串没有什么不同,但是有多种用处。它们允许你在字符串内包含未经转义的单引号和双引号,并且可以跨越多行而无需使用连接符,在编写文档字符串时特别好用。"
23402351
2341- #: ../../glossary.rst:1180
2352+ #: ../../glossary.rst:1185
23422353msgid "type"
23432354msgstr "type -- 类型"
23442355
2345- #: ../../glossary.rst:1182
2356+ #: ../../glossary.rst:1187
23462357msgid ""
23472358"The type of a Python object determines what kind of object it is; every "
23482359"object has a type. An object's type is accessible as its "
@@ -2352,56 +2363,56 @@ msgstr ""
23522363"类型决定一个 Python 对象属于什么种类;每个对象都具有一种类型。要知道对象的类型,可以访问它的 "
23532364":attr:`~instance.__class__` 属性,或是通过 ``type(obj)`` 来获取。"
23542365
2355- #: ../../glossary.rst:1186
2366+ #: ../../glossary.rst:1191
23562367msgid "type alias"
23572368msgstr "type alias -- 类型别名"
23582369
2359- #: ../../glossary.rst:1188
2370+ #: ../../glossary.rst:1193
23602371msgid "A synonym for a type, created by assigning the type to an identifier."
23612372msgstr "一个类型的同义词,创建方式是把类型赋值给特定的标识符。"
23622373
2363- #: ../../glossary.rst:1190
2374+ #: ../../glossary.rst:1195
23642375msgid ""
23652376"Type aliases are useful for simplifying :term:`type hints <type hint>`. For "
23662377"example::"
23672378msgstr "类型别名的作用是简化 :term:`类型注解 <type hint>`。例如::"
23682379
2369- #: ../../glossary.rst:1197
2380+ #: ../../glossary.rst:1202
23702381msgid "could be made more readable like this::"
23712382msgstr "可以这样提高可读性::"
23722383
2373- #: ../../glossary.rst:1204 ../../glossary.rst:1218
2384+ #: ../../glossary.rst:1209 ../../glossary.rst:1223
23742385msgid "See :mod:`typing` and :pep:`484`, which describe this functionality."
23752386msgstr "参见 :mod:`typing` 和 :pep:`484`,其中有对此功能的详细描述。"
23762387
2377- #: ../../glossary.rst:1205
2388+ #: ../../glossary.rst:1210
23782389msgid "type hint"
23792390msgstr "type hint -- 类型注解"
23802391
2381- #: ../../glossary.rst:1207
2392+ #: ../../glossary.rst:1212
23822393msgid ""
23832394"An :term:`annotation` that specifies the expected type for a variable, a "
23842395"class attribute, or a function parameter or return value."
23852396msgstr ":term:`annotation` 为变量、类属性、函数的形参或返回值指定预期的类型。"
23862397
2387- #: ../../glossary.rst:1210
2398+ #: ../../glossary.rst:1215
23882399msgid ""
23892400"Type hints are optional and are not enforced by Python but they are useful "
2390- "to static type analysis tools, and aid IDEs with code completion and "
2391- "refactoring."
2392- msgstr "类型注解属于可选项,Python 不要求提供,但其可对静态类型分析工具起作用,并可协助 IDE 实现代码补全与重构。 "
2401+ "to :term:` static type checkers <static type checker>`. They can also aid "
2402+ "IDEs with code completion and refactoring."
2403+ msgstr ""
23932404
2394- #: ../../glossary.rst:1214
2405+ #: ../../glossary.rst:1219
23952406msgid ""
23962407"Type hints of global variables, class attributes, and functions, but not "
23972408"local variables, can be accessed using :func:`typing.get_type_hints`."
23982409msgstr "全局变量、类属性和函数的类型注解可以使用 :func:`typing.get_type_hints` 来访问,但局部变量则不可以。"
23992410
2400- #: ../../glossary.rst:1219
2411+ #: ../../glossary.rst:1224
24012412msgid "universal newlines"
24022413msgstr "universal newlines -- 通用换行"
24032414
2404- #: ../../glossary.rst:1221
2415+ #: ../../glossary.rst:1226
24052416msgid ""
24062417"A manner of interpreting text streams in which all of the following are "
24072418"recognized as ending a line: the Unix end-of-line convention ``'\\ n'``, the "
@@ -2413,30 +2424,30 @@ msgstr ""
24132424"以及旧版 Macintosh 的约定 ``'\\ r'``。参见 :pep:`278` 和 :pep:`3116` 和 "
24142425":func:`bytes.splitlines` 了解更多用法说明。"
24152426
2416- #: ../../glossary.rst:1226
2427+ #: ../../glossary.rst:1231
24172428msgid "variable annotation"
24182429msgstr "variable annotation -- 变量标注"
24192430
2420- #: ../../glossary.rst:1228
2431+ #: ../../glossary.rst:1233
24212432msgid "An :term:`annotation` of a variable or a class attribute."
24222433msgstr "对变量或类属性的 :term:`annotation`。"
24232434
2424- #: ../../glossary.rst:1230
2435+ #: ../../glossary.rst:1235
24252436msgid ""
24262437"When annotating a variable or a class attribute, assignment is optional::"
24272438msgstr "在标注变量或类属性时,还可选择为其赋值::"
24282439
2429- #: ../../glossary.rst:1235
2440+ #: ../../glossary.rst:1240
24302441msgid ""
24312442"Variable annotations are usually used for :term:`type hints <type hint>`: "
24322443"for example this variable is expected to take :class:`int` values::"
24332444msgstr "变量标注通常被用作 :term:`类型注解 <type hint>`:例如以下变量预期接受 :class:`int` 类型的值::"
24342445
2435- #: ../../glossary.rst:1241
2446+ #: ../../glossary.rst:1246
24362447msgid "Variable annotation syntax is explained in section :ref:`annassign`."
24372448msgstr "变量标注语法的详细解释见 :ref:`annassign` 一节。"
24382449
2439- #: ../../glossary.rst:1243
2450+ #: ../../glossary.rst:1248
24402451msgid ""
24412452"See :term:`function annotation`, :pep:`484` and :pep:`526`, which describe "
24422453"this functionality. Also see :ref:`annotations-howto` for best practices on "
@@ -2445,11 +2456,11 @@ msgstr ""
24452456"参见 :term:`function annotation`, :pep:`484` 和 :pep:`526`,其中描述了此功能。 另请参阅 "
24462457":ref:`annotations-howto` 以了解使用标注的最佳实践。"
24472458
2448- #: ../../glossary.rst:1247
2459+ #: ../../glossary.rst:1252
24492460msgid "virtual environment"
24502461msgstr "virtual environment -- 虚拟环境"
24512462
2452- #: ../../glossary.rst:1249
2463+ #: ../../glossary.rst:1254
24532464msgid ""
24542465"A cooperatively isolated runtime environment that allows Python users and "
24552466"applications to install and upgrade Python distribution packages without "
@@ -2459,25 +2470,25 @@ msgstr ""
24592470"一种采用协作式隔离的运行时环境,允许 Python 用户和应用程序在安装和升级 Python 分发包时不会干扰到同一系统上运行的其他 Python "
24602471"应用程序的行为。"
24612472
2462- #: ../../glossary.rst:1254
2473+ #: ../../glossary.rst:1259
24632474msgid "See also :mod:`venv`."
24642475msgstr "另参见 :mod:`venv`。"
24652476
2466- #: ../../glossary.rst:1255
2477+ #: ../../glossary.rst:1260
24672478msgid "virtual machine"
24682479msgstr "virtual machine -- 虚拟机"
24692480
2470- #: ../../glossary.rst:1257
2481+ #: ../../glossary.rst:1262
24712482msgid ""
24722483"A computer defined entirely in software. Python's virtual machine executes "
24732484"the :term:`bytecode` emitted by the bytecode compiler."
24742485msgstr "一台完全通过软件定义的计算机。Python 虚拟机可执行字节码编译器所生成的 :term:`bytecode`。"
24752486
2476- #: ../../glossary.rst:1259
2487+ #: ../../glossary.rst:1264
24772488msgid "Zen of Python"
24782489msgstr "Zen of Python -- Python 之禅"
24792490
2480- #: ../../glossary.rst:1261
2491+ #: ../../glossary.rst:1266
24812492msgid ""
24822493"Listing of Python design principles and philosophies that are helpful in "
24832494"understanding and using the language. The listing can be found by typing "
0 commit comments