@@ -387,6 +387,9 @@ msgid ""
387387"print the keys and values, and the :meth:`items` and :meth:`values` methods "
388388"are not supported."
389389msgstr ""
390+ ":mod:`dbm.ndbm` 模块提供了对 Unix \" (n)dbm\" 库的接口。 Dbm "
391+ "对象的行为类似于映射(字典),区别在于其键和值总是被存储为字节串。 打印 ``dbm`` 对象不会打印出键和值,并且 :meth:`items` 和 "
392+ ":meth:`values` 等方法也不受支持。"
390393
391394#: /home/travis/build/python/cpython-doc-catalog/Doc/library/dbm.rst:256
392395msgid ""
@@ -395,42 +398,47 @@ msgid ""
395398"attempt to locate the appropriate header file to simplify building this "
396399"module."
397400msgstr ""
401+ "此模块可与 \" 经典classic\" ndbm 接口或 GNU GDBM 兼容接口一同使用。 在 Unix "
402+ "上,:program:`configure` 脚本将尝试定位适当的头文件来简化此模块的构建。"
398403
399404#: /home/travis/build/python/cpython-doc-catalog/Doc/library/dbm.rst:262
400405msgid ""
401406"Raised on :mod:`dbm.ndbm`-specific errors, such as I/O errors. "
402407":exc:`KeyError` is raised for general mapping errors like specifying an "
403408"incorrect key."
404409msgstr ""
410+ "针对 :mod:`dbm.ndbm` 专属错误例如 I/O 错误引发。 :exc:`KeyError` 的引发则针对一般映射错误例如指定了不正确的键。"
405411
406412#: /home/travis/build/python/cpython-doc-catalog/Doc/library/dbm.rst:268
407413msgid "Name of the ``ndbm`` implementation library used."
408- msgstr ""
414+ msgstr "所使用的 ``ndbm`` 实现库的名称。 "
409415
410416#: /home/travis/build/python/cpython-doc-catalog/Doc/library/dbm.rst:273
411417msgid ""
412418"Open a dbm database and return a ``ndbm`` object. The *filename* argument "
413419"is the name of the database file (without the :file:`.dir` or :file:`.pag` "
414420"extensions)."
415421msgstr ""
422+ "打开一个 dbm 数据库并返回 ``ndbm`` 对象。 *filename* 参数为数据库文件名称(不带 :file:`.dir` 或 "
423+ ":file:`.pag` 扩展名)。"
416424
417425#: /home/travis/build/python/cpython-doc-catalog/Doc/library/dbm.rst:276
418426msgid "The optional *flag* argument must be one of these values:"
419- msgstr ""
427+ msgstr "可选的 *flag* 参数必须是下列值之一: "
420428
421429#: /home/travis/build/python/cpython-doc-catalog/Doc/library/dbm.rst:298
422430msgid ""
423431"In addition to the dictionary-like methods, ``ndbm`` objects provide the "
424432"following method:"
425- msgstr ""
433+ msgstr "除了与字典类似的方法,``ndbm`` 对象还有以下方法: "
426434
427435#: /home/travis/build/python/cpython-doc-catalog/Doc/library/dbm.rst:303
428436msgid "Close the ``ndbm`` database."
429- msgstr ""
437+ msgstr "关闭 ``ndbm`` 数据库。 "
430438
431439#: /home/travis/build/python/cpython-doc-catalog/Doc/library/dbm.rst:307
432440msgid ":mod:`dbm.dumb` --- Portable DBM implementation"
433- msgstr ""
441+ msgstr ":mod:`dbm.dumb` --- 便携式 DBM 实现 "
434442
435443#: /home/travis/build/python/cpython-doc-catalog/Doc/library/dbm.rst:312
436444msgid "**Source code:** :source:`Lib/dbm/dumb.py`"
@@ -443,6 +451,8 @@ msgid ""
443451":mod:`dbm.dumb` module is not written for speed and is not nearly as heavily"
444452" used as the other database modules."
445453msgstr ""
454+ ":mod:`dbm.dumb` 模块的目的是在更健壮的模块不可用时作为 :mod:`dbm` 模块的最终回退项。 :mod:`dbm.dumb` "
455+ "不是为高速运行而编写的,也不像其他数据库模块一样被经常使用。"
446456
447457#: /home/travis/build/python/cpython-doc-catalog/Doc/library/dbm.rst:325
448458msgid ""
@@ -451,6 +461,8 @@ msgid ""
451461":mod:`dbm.gnu` no external library is required. As with other persistent "
452462"mappings, the keys and values are always stored as bytes."
453463msgstr ""
464+ ":mod:`dbm.dumb` 模块提供了一个完全以 Python 编写的持久化字典类接口。 不同于 :mod:`dbm.gnu` "
465+ "等其他模块,它不需要外部库。 与其他持久化映射一样,它的键和值也总是被存储为字节串。"
454466
455467#: /home/travis/build/python/cpython-doc-catalog/Doc/library/dbm.rst:330
456468msgid "The module defines the following:"
@@ -462,6 +474,7 @@ msgid ""
462474":exc:`KeyError` is raised for general mapping errors like specifying an "
463475"incorrect key."
464476msgstr ""
477+ "针对 :mod:`dbm.dumb` 专属错误例如 I/O 错误引发。 :exc:`KeyError` 的引发则针对一般映射例如指定了不正确的键。"
465478
466479#: /home/travis/build/python/cpython-doc-catalog/Doc/library/dbm.rst:341
467480msgid ""
@@ -470,13 +483,15 @@ msgid ""
470483"extensions). When a dumbdbm database is created, files with :file:`.dat` "
471484"and :file:`.dir` extensions are created."
472485msgstr ""
486+ "打开一个 ``dumbdbm`` 数据库并返回 dumbdbm 对象。 *filename* 参数为数据库文件的主名称(不带任何特定扩展名)。 创建一个"
487+ " dumbdbm 数据库时将创建多个带有 :file:`.dat` 和 :file:`.dir` 扩展名的文件。"
473488
474489#: /home/travis/build/python/cpython-doc-catalog/Doc/library/dbm.rst:369
475490msgid ""
476491"It is possible to crash the Python interpreter when loading a database with "
477492"a sufficiently large/complex entry due to stack depth limitations in "
478493"Python's AST compiler."
479- msgstr ""
494+ msgstr "当载入包含足够巨大/复杂条目的数据库时有可能导致 Python 解释器的崩溃,这是由于 Python AST 编译器有栈深度限制。 "
480495
481496#: /home/travis/build/python/cpython-doc-catalog/Doc/library/dbm.rst:373
482497msgid ""
0 commit comments