Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f2bd64a

Browse files
[po] auto sync
1 parent d44806b commit f2bd64a

7 files changed

Lines changed: 88 additions & 51 deletions

File tree

library/enum.po

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ msgstr "此 Enum 类装饰器可确保只将一个名称绑定到任意一个值
9191
msgid ""
9292
"Instances are replaced with an appropriate value for Enum members. By "
9393
"default, the initial value starts at 1."
94-
msgstr ""
94+
msgstr "实例会被替换为一个可作为 Enum 成员的适当的值。 默认情况下,初始值从 1 开始。"
9595

9696
#: ../../library/enum.rst:60
9797
msgid "``Flag``, ``IntFlag``, ``auto``"
@@ -368,6 +368,8 @@ msgid ""
368368
"then any value(s) given to the enum member will be passed into those "
369369
"methods. See `Planet`_ for an example."
370370
msgstr ""
371+
"注意:如果你的枚举定义了 :meth:`__new__` 和/或 :meth:`__init__` 那么给予枚举成员的任何值都会被传入这些方法。 "
372+
"请参阅示例 `Planet`_。"
371373

372374
#: ../../library/enum.rst:395
373375
msgid "Restricted Enum subclassing"
@@ -732,6 +734,8 @@ msgid ""
732734
":class:`int` above. This restriction does not apply to mix-ins which only "
733735
"add methods and don't specify another type."
734736
msgstr ""
737+
"虽然 :class:`Enum` 可以拥有任意类型的成员,不过一旦你混合了附加类型,则所有成员必须为相应类型的值,如在上面的例子中即为 "
738+
":class:`int`。 此限制不适用于仅添加方法而未指定另一数据类型的混合类。"
735739

736740
#: ../../library/enum.rst:738
737741
msgid ""
@@ -758,6 +762,10 @@ msgid ""
758762
" the !s and !r format codes to force usage of the :class:`Enum` class's "
759763
":meth:`__str__` and :meth:`__repr__` methods."
760764
msgstr ""
765+
":ref:`格式化字符串字面值 <f-strings>`, :meth:`str.format` 和 :func:`format` 将使用混合类型的 "
766+
":meth:`__format__` 除非在子类中重载了 :meth:`__str__` 或 "
767+
":meth:`__format__`,在这种情况下将使用被重载的方法或 :class:`Enum` 的方法。 请使用 !s 和 !r 格式代码来强制使用"
768+
" :class:`Enum` 类的 :meth:`__str__` 和 :meth:`__repr__` 方法。"
761769

762770
#: ../../library/enum.rst:752
763771
msgid "When to use :meth:`__new__` vs. :meth:`__init__`"
@@ -1016,6 +1024,7 @@ msgid ""
10161024
":class:`str`, that will not be transformed into members, and will be removed"
10171025
" from the final class"
10181026
msgstr ""
1027+
"``_ignore_`` -- 一个名称列表,可以为 :class:`list` 或 :class:`str`,它不会被转化为成员,并将从最终类中被移除"
10191028

10201029
#: ../../library/enum.rst:1063
10211030
msgid ""

library/functions.po

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ msgid ""
320320
"Return the absolute value of a number. The argument may be an integer, a "
321321
"floating point number, or an object implementing :meth:`__abs__`. If the "
322322
"argument is a complex number, its magnitude is returned."
323-
msgstr ""
323+
msgstr "返回一个数的绝对值。 参数可以是整数、浮点数或任何实现了 :meth:`__abs__` 的对象。 如果参数是一个复数,则返回它的模。"
324324

325325
#: ../../library/functions.rst:52
326326
msgid ""
@@ -554,12 +554,14 @@ msgid ""
554554
"those, see :func:`staticmethod` in this section. For more information on "
555555
"class methods, see :ref:`types`."
556556
msgstr ""
557+
"类方法与 C++ 或 Java 中的静态方法不同。 如果你需要后者,请参阅本节中的 :func:`staticmethod`。 "
558+
"有关类方法的更多信息,请参阅 :ref:`types`。"
557559

558560
#: ../../library/functions.rst:227
559561
msgid ""
560562
"Class methods can now wrap other :term:`descriptors <descriptor>` such as "
561563
":func:`property`."
562-
msgstr ""
564+
msgstr "类方法现在可以包装其他 :term:`描述器 <descriptor>` 例如 :func:`property`。"
563565

564566
#: ../../library/functions.rst:233
565567
msgid ""
@@ -1475,6 +1477,8 @@ msgid ""
14751477
"``len`` raises :exc:`OverflowError` on lengths larger than "
14761478
":data:`sys.maxsize`, such as :class:`range(2 ** 100) <range>`."
14771479
msgstr ""
1480+
"``len`` 对于大于 :data:`sys.maxsize` 的长度如 :class:`range(2 ** 100) <range>` 会引发 "
1481+
":exc:`OverflowError`。"
14781482

14791483
#: ../../library/functions.rst:904
14801484
msgid ""
@@ -2811,6 +2815,7 @@ msgid ""
28112815
"When the command line options :option:`-E` or :option:`-I` are being used, "
28122816
"the environment variable :envvar:`PYTHONCASEOK` is now ignored."
28132817
msgstr ""
2818+
"当使用了命令行参数 :option:`-E` 或 :option:`-I` 时,环境变量 :envvar:`PYTHONCASEOK` 现在将被忽略。"
28142819

28152820
#: ../../library/functions.rst:1842
28162821
msgid "Footnotes"

library/functools.po

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ msgid ""
5454
"Simple lightweight unbounded function cache. Sometimes called `\"memoize\" "
5555
"<https://en.wikipedia.org/wiki/Memoization>`_."
5656
msgstr ""
57+
"简单轻量级未绑定函数缓存。 有时称为 `\"memoize\" "
58+
"<https://en.wikipedia.org/wiki/Memoization>`_。"
5759

5860
#: ../../library/functools.rst:34
5961
msgid ""
@@ -62,6 +64,8 @@ msgid ""
6264
"needs to evict old values, this is smaller and faster than "
6365
":func:`lru_cache()` with a size limit."
6466
msgstr ""
67+
"返回值与 ``lru_cache(maxsize=None)`` 相同,创建一个查找函数参数的字典的简单包装器。 "
68+
"因为它不需要移出旧值,所以比带有大小限制的 :func:`lru_cache()` 更小更快。"
6569

6670
#: ../../library/functools.rst:39 ../../library/functools.rst:230
6771
msgid "For example::"
@@ -176,6 +180,8 @@ msgid ""
176180
"and *typed*. This is for information purposes only. Mutating the values "
177181
"has no effect."
178182
msgstr ""
183+
"被包装的函数配有一个 :func:`cache_parameters` 函数,该函数返回一个新的 :class:`dict` 用来显示 "
184+
"*maxsize* 和 *typed* 的值。 这只是出于显示信息的目的。 改变值没有任何效果。"
179185

180186
#: ../../library/functools.rst:147
181187
msgid ""
@@ -212,6 +218,10 @@ msgid ""
212218
"change each day). The cache's size limit assures that the cache does not "
213219
"grow without bound on long-running processes such as web servers."
214220
msgstr ""
221+
"`LRU(最久未使用算法)缓存 "
222+
"<https://en.wikipedia.org/wiki/Cache_replacement_policies#Least_recently_used_(LRU)>`_"
223+
" 在最近的调用是即将到来的调用的最佳预测值时性能最好(例如,新闻服务器上最热门文章倾向于每天更改)。 "
224+
"缓存的大小限制可确保缓存不会在长期运行进程如网站服务器上无限制地增长。"
215225

216226
#: ../../library/functools.rst:167
217227
msgid ""
@@ -246,7 +256,7 @@ msgstr "添加了 *user_function* 选项。"
246256

247257
#: ../../library/functools.rst:217
248258
msgid "Added the function :func:`cache_parameters`"
249-
msgstr ""
259+
msgstr "新增函数 :func:`cache_parameters`"
250260

251261
#: ../../library/functools.rst:222
252262
msgid ""

library/plistlib.po

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ msgid ""
6767
"dictionaries (but only with string keys), :class:`bytes`, :class:`bytearray`"
6868
" or :class:`datetime.datetime` objects."
6969
msgstr ""
70+
"值可以为字符串、整数、浮点数、布尔值、元组、列表、字典(但只允许用字符串作为键)、:class:`bytes`、:class:`bytearray` 或"
71+
" :class:`datetime.datetime` 对象。"
7072

7173
#: ../../library/plistlib.rst:37
7274
msgid "New API, old API deprecated. Support for binary format plists added."
@@ -82,7 +84,7 @@ msgstr ""
8284

8385
#: ../../library/plistlib.rst:44
8486
msgid "Old API removed."
85-
msgstr ""
87+
msgstr "旧 API 已被移除。"
8688

8789
#: ../../library/plistlib.rst:49
8890
msgid ""

library/types.po

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ msgstr "一个映射的只读代理。 它提供了对映射条目的动态视
369369
msgid ""
370370
"Updated to support the new union (``|``) operator from :pep:`584`, which "
371371
"simply delegates to the underlying mapping."
372-
msgstr ""
372+
msgstr "更新为支持 :pep:`584` 所新增的合并 (``|``) 运算符,它会简单地委托给下层的映射。"
373373

374374
#: ../../library/types.rst:292
375375
msgid ""
@@ -421,7 +421,7 @@ msgstr "返回由下层映射的值组成的一个新视图。"
421421

422422
#: ../../library/types.rst:334
423423
msgid "Return a reverse iterator over the keys of the underlying mapping."
424-
msgstr ""
424+
msgstr "返回一个包含下层映射的键的反向迭代器。"
425425

426426
#: ../../library/types.rst:340
427427
msgid "Additional Utility Classes and Functions"
@@ -459,7 +459,7 @@ msgstr ""
459459
msgid ""
460460
"Attribute order in the repr changed from alphabetical to insertion (like "
461461
"``dict``)."
462-
msgstr ""
462+
msgstr "repr 中的属性顺序由字母顺序改为插入顺序 (类似 ``dict``)。"
463463

464464
#: ../../library/types.rst:376
465465
msgid "Route attribute access on a class to __getattr__."
@@ -480,7 +480,7 @@ msgid ""
480480
"This allows one to have properties active on an instance, and have virtual "
481481
"attributes on the class with the same name (see :class:`enum.Enum` for an "
482482
"example)."
483-
msgstr ""
483+
msgstr "这允许有在实例上激活的特性属性,同时又有在类上的同名虚拟属性 (一个例子请参见 :class:`enum.Enum`)。"
484484

485485
#: ../../library/types.rst:390
486486
msgid "Coroutine Utility Functions"

tutorial/errors.po

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ msgid ""
106106
"exception occurred, in the form of a stack traceback. In general it contains"
107107
" a stack traceback listing source lines; however, it will not display lines "
108108
"read from standard input."
109-
msgstr ""
109+
msgstr "错误消息的开头部分以堆栈回溯的形式显示发生异常的上下文。 通常它会包含列出源代码行的堆栈回溯;但是,它将不会显示从标准输入读取的行。"
110110

111111
#: ../../tutorial/errors.rst:74
112112
msgid ""
@@ -290,18 +290,20 @@ msgstr "如果你需要确定是否引发了异常但不打算处理它,则可
290290

291291
#: ../../tutorial/errors.rst:273
292292
msgid "Exception Chaining"
293-
msgstr ""
293+
msgstr "异常链"
294294

295295
#: ../../tutorial/errors.rst:275
296296
msgid ""
297297
"The :keyword:`raise` statement allows an optional :keyword:`from` which "
298298
"enables chaining exceptions by setting the ``__cause__`` attribute of the "
299299
"raised exception. For example::"
300300
msgstr ""
301+
":keyword:`raise` 语句允许可选的 :keyword:`from` 子句,它通过设置所引发异常的 ``__cause__`` "
302+
"属性来启用异常链。 例如::"
301303

302304
#: ../../tutorial/errors.rst:281
303305
msgid "This can be useful when you are transforming exceptions. For example::"
304-
msgstr ""
306+
msgstr "这在你要转换异常时很有用。 例如::"
305307

306308
#: ../../tutorial/errors.rst:302
307309
msgid ""
@@ -310,6 +312,8 @@ msgid ""
310312
"raised inside an exception handler or :keyword:`finally` section. Exception "
311313
"chaining can be disabled by using ``from None`` idiom:"
312314
msgstr ""
315+
"跟在 :keyword:`from` 之后的表达式必须是一个异常或为 ``None``。 当在一个异常处理程序或 :keyword:`finally` "
316+
"子句中又引发了一个异常时异常链将自动生成。 异常链可使用 ``from None`` 形式来禁用:"
313317

314318
#: ../../tutorial/errors.rst:320
315319
msgid "User-defined Exceptions"

0 commit comments

Comments
 (0)