@@ -15,7 +15,7 @@ msgid ""
1515msgstr ""
1616"Project-Id-Version : Python 3.12\n "
1717"Report-Msgid-Bugs-To : \n "
18- "POT-Creation-Date : 2023-07-28 14:13+0000\n "
18+ "POT-Creation-Date : 2023-12-29 14:13+0000\n "
1919"PO-Revision-Date : 2021-06-28 01:04+0000\n "
2020"
Last-Translator :
Freesand Leo <[email protected] >, 2023\n "
2121"Language-Team : Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
@@ -74,7 +74,7 @@ msgstr ""
7474"(``''``);或是包含所需模块名称的字符串,例如 ``'dbm.ndbm'`` 或 ``'dbm.gnu'``。"
7575
7676#: ../../library/dbm.rst:36 ../../library/dbm.rst:210
77- #: ../../library/dbm.rst:309 ../../library/dbm.rst:393
77+ #: ../../library/dbm.rst:316 ../../library/dbm.rst:400
7878msgid "Accepts :term:`path-like object` for filename."
7979msgstr "接受 :term:`path-like object` 作为文件名。"
8080
@@ -91,64 +91,64 @@ msgstr ""
9191"如果数据库文件已存在,则使用 :func:`whichdb` 函数来确定其类型和要使用的适当模块;如果文件不存在,则会使用上述可导入模块中的第一个。"
9292
9393#: ../../library/dbm.rst:47 ../../library/dbm.rst:166
94- #: ../../library/dbm.rst:357
94+ #: ../../library/dbm.rst:364
9595msgid "The optional *flag* argument can be:"
9696msgstr "可选的 *flag* 参数可以是:"
9797
9898#: ../../library/dbm.rst:50 ../../library/dbm.rst:169
99- #: ../../library/dbm.rst:188 ../../library/dbm.rst:287
100- #: ../../library/dbm.rst:360
99+ #: ../../library/dbm.rst:188 ../../library/dbm.rst:294
100+ #: ../../library/dbm.rst:367
101101msgid "Value"
102102msgstr "值"
103103
104104#: ../../library/dbm.rst:50 ../../library/dbm.rst:169
105- #: ../../library/dbm.rst:188 ../../library/dbm.rst:287
106- #: ../../library/dbm.rst:360
105+ #: ../../library/dbm.rst:188 ../../library/dbm.rst:294
106+ #: ../../library/dbm.rst:367
107107msgid "Meaning"
108108msgstr "含意"
109109
110110#: ../../library/dbm.rst:52 ../../library/dbm.rst:171
111- #: ../../library/dbm.rst:289 ../../library/dbm.rst:362
111+ #: ../../library/dbm.rst:296 ../../library/dbm.rst:369
112112msgid "``'r'``"
113113msgstr "``'r'``"
114114
115115#: ../../library/dbm.rst:52 ../../library/dbm.rst:171
116- #: ../../library/dbm.rst:289 ../../library/dbm.rst:362
116+ #: ../../library/dbm.rst:296 ../../library/dbm.rst:369
117117msgid "Open existing database for reading only (default)"
118118msgstr "以只读方式打开现有数据库(默认)"
119119
120120#: ../../library/dbm.rst:55 ../../library/dbm.rst:174
121- #: ../../library/dbm.rst:292 ../../library/dbm.rst:365
121+ #: ../../library/dbm.rst:299 ../../library/dbm.rst:372
122122msgid "``'w'``"
123123msgstr "``'w'``"
124124
125125#: ../../library/dbm.rst:55 ../../library/dbm.rst:174
126- #: ../../library/dbm.rst:292 ../../library/dbm.rst:365
126+ #: ../../library/dbm.rst:299 ../../library/dbm.rst:372
127127msgid "Open existing database for reading and writing"
128128msgstr "以读写方式打开现有数据库"
129129
130130#: ../../library/dbm.rst:58 ../../library/dbm.rst:177
131- #: ../../library/dbm.rst:295 ../../library/dbm.rst:368
131+ #: ../../library/dbm.rst:302 ../../library/dbm.rst:375
132132msgid "``'c'``"
133133msgstr "``'c'``"
134134
135135#: ../../library/dbm.rst:58 ../../library/dbm.rst:177
136- #: ../../library/dbm.rst:295 ../../library/dbm.rst:368
136+ #: ../../library/dbm.rst:302 ../../library/dbm.rst:375
137137msgid "Open database for reading and writing, creating it if it doesn't exist"
138138msgstr "以读写方式打开数据库,如果不存在则创建它"
139139
140140#: ../../library/dbm.rst:61 ../../library/dbm.rst:180
141- #: ../../library/dbm.rst:298 ../../library/dbm.rst:371
141+ #: ../../library/dbm.rst:305 ../../library/dbm.rst:378
142142msgid "``'n'``"
143143msgstr "``'n'``"
144144
145145#: ../../library/dbm.rst:61 ../../library/dbm.rst:180
146- #: ../../library/dbm.rst:298 ../../library/dbm.rst:371
146+ #: ../../library/dbm.rst:305 ../../library/dbm.rst:378
147147msgid "Always create a new, empty database, open for reading and writing"
148148msgstr "始终创建一个新的空数据库,以读写方式打开"
149149
150- #: ../../library/dbm.rst:65 ../../library/dbm.rst:302
151- #: ../../library/dbm.rst:375
150+ #: ../../library/dbm.rst:65 ../../library/dbm.rst:309
151+ #: ../../library/dbm.rst:382
152152msgid ""
153153"The optional *mode* argument is the Unix mode of the file, used only when "
154154"the database has to be created. It defaults to octal ``0o666`` (and will be"
@@ -389,17 +389,27 @@ msgstr ""
389389
390390#: ../../library/dbm.rst:270
391391msgid ""
392+ "The ndbm library shipped as part of macOS has an undocumented limitation on "
393+ "the size of values, which can result in corrupted database files when "
394+ "storing values larger than this limit. Reading such corrupted files can "
395+ "result in a hard crash (segmentation fault)."
396+ msgstr ""
397+ "作为 macOS 的一部分提供的 ndbm "
398+ "库对值的大小有一个未写入文档的限制,当存储的值大于此限制时可能会导致数据库文件损坏。读取这种已损坏的文件可能会导致硬崩溃(段错误)。"
399+
400+ #: ../../library/dbm.rst:277
401+ msgid ""
392402"Raised on :mod:`dbm.ndbm`-specific errors, such as I/O errors. "
393403":exc:`KeyError` is raised for general mapping errors like specifying an "
394404"incorrect key."
395405msgstr ""
396406"针对 :mod:`dbm.ndbm` 专属错误例如 I/O 错误引发。 :exc:`KeyError` 的引发则针对一般映射错误例如指定了不正确的键。"
397407
398- #: ../../library/dbm.rst:276
408+ #: ../../library/dbm.rst:283
399409msgid "Name of the ``ndbm`` implementation library used."
400410msgstr "所使用的 ``ndbm`` 实现库的名称。"
401411
402- #: ../../library/dbm.rst:281
412+ #: ../../library/dbm.rst:288
403413msgid ""
404414"Open a dbm database and return a ``ndbm`` object. The *filename* argument "
405415"is the name of the database file (without the :file:`.dir` or :file:`.pag` "
@@ -408,29 +418,29 @@ msgstr ""
408418"打开一个 dbm 数据库并返回 ``ndbm`` 对象。 *filename* 参数为数据库文件名称(不带 :file:`.dir` 或 "
409419":file:`.pag` 扩展名)。"
410420
411- #: ../../library/dbm.rst:284
421+ #: ../../library/dbm.rst:291
412422msgid "The optional *flag* argument must be one of these values:"
413423msgstr "可选的 *flag* 参数必须是下列值之一:"
414424
415- #: ../../library/dbm.rst:306
425+ #: ../../library/dbm.rst:313
416426msgid ""
417427"In addition to the dictionary-like methods, ``ndbm`` objects provide the "
418428"following method:"
419429msgstr "除了与字典类似的方法,``ndbm`` 对象还有以下方法:"
420430
421- #: ../../library/dbm.rst:314
431+ #: ../../library/dbm.rst:321
422432msgid "Close the ``ndbm`` database."
423433msgstr "关闭 ``ndbm`` 数据库。"
424434
425- #: ../../library/dbm.rst:318
435+ #: ../../library/dbm.rst:325
426436msgid ":mod:`dbm.dumb` --- Portable DBM implementation"
427437msgstr ":mod:`dbm.dumb` --- 便携式 DBM 实现"
428438
429- #: ../../library/dbm.rst:323
439+ #: ../../library/dbm.rst:330
430440msgid "**Source code:** :source:`Lib/dbm/dumb.py`"
431441msgstr "**源代码:** :source:`Lib/dbm/dumb.py`"
432442
433- #: ../../library/dbm.rst:329
443+ #: ../../library/dbm.rst:336
434444msgid ""
435445"The :mod:`dbm.dumb` module is intended as a last resort fallback for the "
436446":mod:`dbm` module when a more robust module is not available. The "
@@ -440,7 +450,7 @@ msgstr ""
440450":mod:`dbm.dumb` 模块的目的是在更健壮的模块不可用时作为 :mod:`dbm` 模块的最终回退项。 :mod:`dbm.dumb` "
441451"不是为高速运行而编写的,也不像其他数据库模块一样被经常使用。"
442452
443- #: ../../library/dbm.rst:336
453+ #: ../../library/dbm.rst:343
444454msgid ""
445455"The :mod:`dbm.dumb` module provides a persistent dictionary-like interface "
446456"which is written entirely in Python. Unlike other modules such as "
@@ -450,19 +460,19 @@ msgstr ""
450460":mod:`dbm.dumb` 模块提供了一个完全以 Python 编写的持久化字典类接口。 不同于 :mod:`dbm.gnu` "
451461"等其他模块,它不需要外部库。 与其他持久化映射一样,它的键和值也总是被存储为字节串。"
452462
453- #: ../../library/dbm.rst:341
463+ #: ../../library/dbm.rst:348
454464msgid "The module defines the following:"
455465msgstr "该模块定义以下内容:"
456466
457- #: ../../library/dbm.rst:346
467+ #: ../../library/dbm.rst:353
458468msgid ""
459469"Raised on :mod:`dbm.dumb`-specific errors, such as I/O errors. "
460470":exc:`KeyError` is raised for general mapping errors like specifying an "
461471"incorrect key."
462472msgstr ""
463473"针对 :mod:`dbm.dumb` 专属错误例如 I/O 错误引发。 :exc:`KeyError` 的引发则针对一般映射例如指定了不正确的键。"
464474
465- #: ../../library/dbm.rst:352
475+ #: ../../library/dbm.rst:359
466476msgid ""
467477"Open a ``dumbdbm`` database and return a dumbdbm object. The *filename* "
468478"argument is the basename of the database file (without any specific "
@@ -472,26 +482,26 @@ msgstr ""
472482"打开一个 ``dumbdbm`` 数据库并返回 dumbdbm 对象。 *filename* 参数为数据库文件的主名称(不带任何特定扩展名)。 创建一个"
473483" dumbdbm 数据库时将创建多个带有 :file:`.dat` 和 :file:`.dir` 扩展名的文件。"
474484
475- #: ../../library/dbm.rst:380
485+ #: ../../library/dbm.rst:387
476486msgid ""
477487"It is possible to crash the Python interpreter when loading a database with "
478488"a sufficiently large/complex entry due to stack depth limitations in "
479489"Python's AST compiler."
480490msgstr "当载入包含足够巨大/复杂条目的数据库时有可能导致 Python 解释器的崩溃,这是由于 Python AST 编译器有栈深度限制。"
481491
482- #: ../../library/dbm.rst:384
492+ #: ../../library/dbm.rst:391
483493msgid ""
484494":func:`.open` always creates a new database when the flag has the value "
485495"``'n'``."
486496msgstr ":func:`.open` 在 flag 值为 ``'n'`` 时将总是创建一个新的数据库。"
487497
488- #: ../../library/dbm.rst:388
498+ #: ../../library/dbm.rst:395
489499msgid ""
490500"A database opened with flags ``'r'`` is now read-only. Opening with flags "
491501"``'r'`` and ``'w'`` no longer creates a database if it does not exist."
492502msgstr "附带 ``'r'`` 旗标打开的数据库现在将是只读的。 附带 ``'r'`` 和 ``'w'`` 旗标的打开操作不会再创建数据库。"
493503
494- #: ../../library/dbm.rst:396
504+ #: ../../library/dbm.rst:403
495505msgid ""
496506"In addition to the methods provided by the "
497507":class:`collections.abc.MutableMapping` class, :class:`dumbdbm` objects "
@@ -500,16 +510,16 @@ msgstr ""
500510"除了 :class:`collections.abc.MutableMapping` 类所提供的方法,:class:`dumbdbm` "
501511"对象还提供了以下方法:"
502512
503- #: ../../library/dbm.rst:402
513+ #: ../../library/dbm.rst:409
504514msgid ""
505515"Synchronize the on-disk directory and data files. This method is called by "
506516"the :meth:`Shelve.sync` method."
507517msgstr "同步磁盘上的目录和数据文件。 此方法会由 :meth:`Shelve.sync` 方法来调用。"
508518
509- #: ../../library/dbm.rst:407
519+ #: ../../library/dbm.rst:414
510520msgid "Close the ``dumbdbm`` database."
511521msgstr "关闭 ``dumbdbm`` 数据库。"
512522
513- #: ../../library/dbm.rst:325
523+ #: ../../library/dbm.rst:332
514524msgid "databases"
515525msgstr "数据库"
0 commit comments