8000 [po] auto sync · python/python-docs-zh-cn@379f0ee · GitHub
[go: up one dir, main page]

Skip to content

Commit 379f0ee

Browse files
[po] auto sync
1 parent 0560ca7 commit 379f0ee

File tree

3 files changed

+98
-25
lines changed

3 files changed

+98
-25
lines changed

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "91.65%", "updated_at": "2024-03-01T15:22:52Z"}
1+
{"translation": "91.76%", "updated_at": "2024-03-04T00:29:10Z"}

whatsnew/2.7.po

Lines changed: 54 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,15 @@
99
# Shengjing Zhu <zsj950618@gmail.com>, 2020
1010
# zeroswan <zeroswan@outlook.com>, 2020
1111
# Rafael Fontenelle <rffontenelle@gmail.com>, 2023
12+
# Alpha Du <alphanow@gmail.com>, 2024
1213
# Freesand Leo <yuqinju@163.com>, 2024
1314
#
1415
#, fuzzy
1516
msgid ""
1617
msgstr ""
1718
"Project-Id-Version: Python 3.9\n"
1819
"Report-Msgid-Bugs-To: \n"
19-
"POT-Creation-Date: 2024-02-16 21:12+0000\n"
20+
"POT-Creation-Date: 2024-03-01 21:26+0000\n"
2021
"PO-Revision-Date: 2017-02-16 23:43+0000\n"
2122
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2024\n"
2223
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -54,6 +55,10 @@ msgid ""
5455
":class:`~collections.Counter` classes in the :mod:`collections` module, and "
5556
"many other improvements."
5657
msgstr ""
58+
"数字处理在许多方面得到了改进,包括浮点数和 :class:`~decimal.Decimal` 类。标准库中有一些有用的补充,例如大大增强的 "
59+
":mod:`unittest` 模块,用于解析命令行选项的 :mod:`argparse` 模块,在 :mod:`collections` 模块中方便的"
60+
" :class:`~collections.OrderedDict` 和 :class:`~collections.Counter` "
61+
"类,以及许多其他改进。"
5762

5863
#: ../../whatsnew/2.7.rst:63
5964
msgid ""
@@ -62,6 +67,8 @@ msgid ""
6267
"3, several new features from the Python 3.x series have been included in "
6368
"2.7."
6469
msgstr ""
70+
"Python 2.7计划成为2.x版本的最后一个发布版本,因此我们努力使其成为长期支持的好版本。为了帮助迁移到Python "
71+
"3,我们在2.7中包含了几个来自Python 3.x系列的新特性。"
6572

6673
#: ../../whatsnew/2.7.rst:68
6774
msgid ""
@@ -74,6 +81,9 @@ msgid ""
7481
"Whenever possible, \"What's New in Python\" links to the bug/patch item for "
7582
"each change."
7683
msgstr ""
84+
"本文并不试图提供新特性的完整规范说明,而是提供一个方便的概览。要了解完整的细节,请参阅Python "
85+
"2.7的文档。如果你想了解有关设计和实现的具体考量,请参阅特定新特性的PEP或在https://bugs.python.org上讨论更改的问题。在可能的情况下,“What's"
86+
" New in Python”链接到每个更改的错误修正/补丁项。"
7787

7888
#: ../../whatsnew/2.7.rst:80
7989
msgid "The Future for Python 2.x"
@@ -186,13 +196,18 @@ msgid ""
186196
" in the branch that became Python 3.2. (Discussed on stdlib-sig and carried "
187197
"out in :issue:`7319`.)"
188198
msgstr ""
199+
"对于Python 2.7,一个策略决定是默认情况下禁止只对开发人员有兴趣的警告。 现在,除非另有要求,否则将忽略 "
200+
":exc:`DeprecationWarning` 及其子类,以防止用户看到应用程序触发的警告。 这个更改也在成为Python 3.2 "
201+
"的分歧点上进行了。 (在 stdlib-sig 上进行了讨论,并在 :issue:`7319` 中执行。)"
189202

190203
#: ../../whatsnew/2.7.rst:146
191204
msgid ""
192205
"In previous releases, :exc:`DeprecationWarning` messages were enabled by "
193206
"default, providing Python developers with a clear indication of where their "
194207
"code may break in a future major version of Python."
195208
msgstr ""
209+
"在以前的版本中,默认情况下启用了 :exc:`DeprecationWarning` 消息,为 Python "
210+
"开发人员提供了一个明确的指示,说明他们的代码可能在未来的 Python 主要版本中出现问题。"
196211

197212
#: ../../whatsnew/2.7.rst:151
198213
msgid ""
@@ -202,6 +217,8 @@ msgid ""
202217
" worry about an application that's actually working correctly and burdening "
203218
"application developers with responding to these concerns."
204219
msgstr ""
220+
"然而,越来越多基于 Python 的应用程序的用户并不直接参与这些应用程序的开发。:exc:`DeprecationWarning` "
221+
"消息与这些用户无关,这让他们担心应用能否真正正常工作,并让应用开发人员承担起回应这些担忧的负担。"
205222

206223
#: ../../whatsnew/2.7.rst:158
207224
msgid ""
@@ -211,12 +228,16 @@ msgid ""
211228
"``\"default\"`` (or ``\"d\"``) before running Python. Python code can also "
212229
"re-enable them by calling ``warnings.simplefilter('default')``."
213230
msgstr ""
231+
"显示通过使用 :option:`-Wdefault<-W>` (简写: :option:`-Wd<-W>`) 开关运行 Python,或者在运行 "
232+
"Python 之前将 :envvar:`PYTHONWARNINGS` 环境变量设置为 ``\"default\"`` (或 "
233+
"``\"d\"``),可以重新启用 :exc:`DeprecationWarning` 消息。 Python 代码也可以通过调用 "
234+
"``warnings.simplefilter('default')`` 重新启用它们。"
214235

215236
#: ../../whatsnew/2.7.rst:165
216237
msgid ""
217238
"The ``unittest`` module also automatically reenables deprecation warnings "
218239
"when running tests."
219-
msgstr ""
240+
msgstr "``unittest`` 模块还会在运行测试时自动重新启用弃用警告。"
220241

221242
#: ../../whatsnew/2.7.rst:170
222243
msgid "Python 3.1 Features"
@@ -277,25 +298,27 @@ msgid ""
277298
" in previous versions of Python, it's guaranteed that ``float(repr(x))`` "
278299
"recovers ``x``."
279300
msgstr ""
301+
"在很多情况下,浮点数 ``x`` 的 :func:`repr` 更短:现在它基于最短的十进制字符串 ,保证四舍五入到 ``x``。 与 Python "
302+
"以前的版本一样,保证 ``float(repr(x))`` 能恢复到 ``x``。"
280303

281304
#: ../../whatsnew/2.7.rst:192
282305
msgid ""
283306
"Float-to-string and string-to-float conversions are correctly rounded. The "
284307
":func:`round` function is also now correctly rounded."
285-
msgstr ""
308+
msgstr "浮点数到字符串和字符串到浮点数的转换已正确舍入。:func:`round` 函数现在也能正确舍入。"
286309

287310
#: ../../whatsnew/2.7.rst:194
288311
msgid ""
289312
"The :c:type:`PyCapsule` type, used to provide a C API for extension modules."
290-
msgstr ""
313+
msgstr ":c:type:`PyCapsule` 类型,用于为扩展模块提供 C API 。"
291314

292315
#: ../../whatsnew/2.7.rst:195
293316
msgid "The :c:func:`PyLong_AsLongAndOverflow` C API function."
294-
msgstr ""
317+
msgstr ":c:func:`PyLong_AsLongAndOverflow` C API 函数 。"
295318

296319
#: ../../whatsnew/2.7.rst:197
297320
msgid "Other new Python3-mode warnings include:"
298-
msgstr ""
321+
msgstr "其他新的 Python3 模式警告包括:"
299322

300323
#: ../../whatsnew/2.7.rst:199
301324
msgid ""
@@ -309,10 +332,11 @@ msgid ""
309332
"switch that causes warnings about using classic division with integers and "
310333
"long integers."
311334
msgstr ""
335+
":option:`!-3` 开关现在会自动启用:option:`!-Qwarn` 开关,该开关会在使用经典整除法处理整数和长整数时发出警告。"
312336

313337
#: ../../whatsnew/2.7.rst:214
314338
msgid "PEP 372: Adding an Ordered Dictionary to collections"
315-
msgstr ""
339+
msgstr "PEP 372:将有序字典 添加到收藏集"
316340

317341
#: ../../whatsnew/2.7.rst:216
318342
msgid ""
@@ -323,23 +347,27 @@ msgid ""
323347
"introduces a new :class:`~collections.OrderedDict` class in the "
324348
":mod:`collections` module."
325349
msgstr ""
350+
"常规 Python 字典以任意顺序遍历键/值对。 多年来,许多作者编写了替代实现,以记住键最初插入的顺序。 基于这些实现的经验,2.7 在 "
351+
":mod:`collections` 模块 中引入了一个新的 :class:`~collections.OrderedDict` 类。"
326352

327353
#: ../../whatsnew/2.7.rst:222
328354
msgid ""
329355
"The :class:`~collections.OrderedDict` API provides the same interface as "
330356
"regular dictionaries but iterates over keys and values in a guaranteed order"
331357
" depending on when a key was first inserted::"
332358
msgstr ""
359+
":class:`~collections.OrderedDict` API 提供与普通字典相同的接口 "
360+
",但会根据键首次插入的时间,按一定顺序遍历键和值::"
333361

334362
#: ../../whatsnew/2.7.rst:233
335363
msgid ""
336364
"If a new entry overwrites an existing entry, the original insertion position"
337365
" is left unchanged::"
338-
msgstr ""
366+
msgstr "如果新条目覆盖了现有条目,则原插入位置保持不变 ::"
339367

340368
#: ../../whatsnew/2.7.rst:240
341369
msgid "Deleting an entry and reinserting it will move it to the end::"
342-
msgstr ""
370+
msgstr "删除条目并重新插入会将其移至末尾 ::"
343371

344372
#: ../../whatsnew/2.7.rst:247
345373
msgid ""
@@ -348,18 +376,20 @@ msgid ""
348376
"added key is returned and removed; if it's false, the oldest key is "
349377
"selected::"
350378
msgstr ""
379+
":meth:`~collections.OrderedDict.popitem` 方法有一个可选 *last* 参数 ,默认为 ``True`` 。如果"
380+
" *last* 为真 ,则返回并删除最近添加的密钥;如果为 false ,则选择最旧的密钥: :"
351381

352382
#: ../../whatsnew/2.7.rst:262
353383
msgid ""
354384
"Comparing two ordered dictionaries checks both the keys and values, and "
355385
"requires that the insertion order was the same::"
356-
msgstr ""
386+
msgstr "比较两个有序字典会同时检查键和值,并要求插入顺序相同 ::"
357387

358388
#: ../../whatsnew/2.7.rst:278
359389
msgid ""
360390
"Comparing an :class:`~collections.OrderedDict` with a regular dictionary "
361391
"ignores the insertion order and just compares the keys and values."
362-
msgstr ""
392+
msgstr "将 :class:`~collections.OrderedDict` 与普通字典进行比较时,会忽略插入顺序,只比较键和值。"
363393

364394
#: ../../whatsnew/2.7.rst:281
365395
msgid ""
@@ -373,7 +403,7 @@ msgstr ""
373403
msgid ""
374404
"The standard library now supports use of ordered dictionaries in several "
375405
"modules."
376-
msgstr ""
406+
msgstr "现在,标准库支持在多个模块 中使用有序字典。"
377407

378408
#: ../../whatsnew/2.7.rst:290
379409
msgid ""
@@ -388,6 +418,9 @@ msgid ""
388418
":func:`collections.namedtuple` now returns an ordered dictionary with the "
389419
"values appearing in the same order as the underlying tuple indices."
390420
msgstr ""
421+
":func:`collections.namedtuple` 的 "
422+
":meth:`~collections.somenamedtuple._asdict()` "
423+
"方法现在会返回一个有序字典,其值的出现顺序与底层元组的索引相同。"
391424

392425
#: ../../whatsnew/2.7.rst:298
393426
msgid ""
@@ -417,6 +450,8 @@ msgid ""
417450
"large numbers, rendering them as 18,446,744,073,709,551,616 instead of "
418451
"18446744073709551616."
419452
msgstr ""
453+
"为了使程序输出更易读,可以在大数字上添加分隔符,将其显示为 18,446,744,073,709,551,616 而不是 "
454+
"18446744073709551616。"
420455

421456
#: ../../whatsnew/2.7.rst:319
422457
msgid ""
@@ -426,17 +461,20 @@ msgid ""
426461
"unsuitable for multi-threaded applications where different threads are "
427462
"producing output for different locales."
428463
msgstr ""
464+
"完全通用的解决方案是 :mod:`locale` 模块 ,它可以使用不同的分隔符(北美为\",\",欧洲为\".\")和不同的分组大小,但 "
465+
":mod:`locale` 使用起来比较复杂,而且不适合多线程应用程序,因为不同的线程会为不同的本地生成输出。"
429466

430467
#: ../../whatsnew/2.7.rst:325
431468
msgid ""
432469
"Therefore, a simple comma-grouping mechanism has been added to the mini-"
433470
"language used by the :meth:`str.format` method. When formatting a floating-"
434471
"point number, simply include a comma between the width and the precision::"
435472
msgstr ""
473+
"因此,在 :meth:`str.format` 方法使用的迷你语言中添加了一个简单的逗号分组机制。 在格式化浮点数时,只需在宽度和精度之间加上逗号 ::"
436474

437475
#: ../../whatsnew/2.7.rst:333
438476
msgid "When formatting an integer, include the comma after the width:"
439-
msgstr ""
477+
msgstr "格式化整数时,在宽度后面加上逗号:"
440478

441479
#: ../../whatsnew/2.7.rst:338
442480
msgid ""
@@ -445,6 +483,7 @@ msgid ""
445483
"formatting mechanism isn't as general as the :mod:`locale` module, but it's "
446484
"easier to use."
447485
msgstr ""
486+
"这种机制完全没有适应性;逗号总是用作分隔符,分组总是以三位数为一组。 逗号格式机制不如 :mod:`locale` 模块通用,但使用起来更方便。"
448487

449488
#: ../../whatsnew/2.7.rst:345
450489
msgid ":pep:`378` - Format Specifier for Thousands Separator"
@@ -456,13 +495,13 @@ msgstr "PEP 由 Raymond Hettinger 撰写,由 Eric Smith 实现"
456495

457496
#: ../../whatsnew/2.7.rst:349
458497
msgid "PEP 389: The argparse Module for Parsing Command Lines"
459-
msgstr ""
498+
msgstr "PEP 389:用于解析命令行的 argparse 模块 "
460499

461500
#: ../../whatsnew/2.7.rst:351
462501
msgid ""
463502
"The :mod:`argparse` module for parsing command-line arguments was added as a"
464503
" more powerful replacement for the :mod:`optparse` module."
465-
msgstr ""
504+
msgstr "用于解析命令-line参数的 :mod:`argparse` 模块是作为 :mod:`optparse` 模块更强大的替代功能而添加的。"
466505

467506
#: ../../whatsnew/2.7.rst:355
468507
msgid ""

0 commit comments

Comments
 (0)
0