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

Skip to content

Commit d9fe4c7

Browse files
committed
[po] auto sync bot
1 parent dcb0987 commit d9fe4c7

2 files changed

Lines changed: 24 additions & 7 deletions

File tree

howto/pyporting.po

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,18 @@
33
# This file is distributed under the same license as the Python package.
44
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55
#
6+
# Translators:
7+
# Chengeng Ning <[email protected]>, 2018
8+
# Freesand Leo <[email protected]>, 2018
9+
# Junkai Shao <[email protected]>, 2018
10+
#
611
#, fuzzy
712
msgid ""
813
msgstr ""
914
"Project-Id-Version: Python 3.7\n"
1015
"Report-Msgid-Bugs-To: \n"
1116
"POT-Creation-Date: 2018-06-30 05:56+0900\n"
12-
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
17+
"PO-Revision-Date: 2017-02-16 17:45+0000\n"
1318
"Last-Translator: Junkai Shao <[email protected]>, 2018\n"
1419
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
1520
"MIME-Version: 1.0\n"
@@ -20,7 +25,7 @@ msgstr ""
2025

2126
#: ../../howto/pyporting.rst:5
2227
msgid "Porting Python 2 Code to Python 3"
23-
msgstr "将Python 2 代码迁移到Python 3"
28+
msgstr "将 Python 2 代码迁移到 Python 3"
2429

2530
#: ../../howto/pyporting.rst:0
2631
msgid "author"
@@ -41,23 +46,23 @@ msgid ""
4146
"Python. This guide is meant to help you figure out how best to support both "
4247
"Python 2 & 3 simultaneously."
4348
msgstr ""
44-
"Python 3是Python的未来,而Python "
45-
"2仍处于活跃使用阶段,最好让您的项目可用于两个主要版本的Python。本指南旨在帮助您了解如何同时最好地同时支持Python 2和3。"
49+
"Python 3 是 Python 的未来,但 Python 2 仍处于活跃使用阶段,最好让您的项目在两个主要版本的Python "
50+
"上都可用。本指南旨在帮助您了解如何最好地同时支持 Python 2 和 3。"
4651

4752
#: ../../howto/pyporting.rst:16
4853
msgid ""
4954
"If you are looking to port an extension module instead of pure Python code, "
5055
"please see :ref:`cporting-howto`."
51-
msgstr "如果您希望迁移扩展模块而不是纯Python代码,请参阅 :ref:`cporting-howto`。"
56+
msgstr "如果您希望迁移扩展模块而不是纯 Python 代码,请参阅 :ref:`cporting-howto`。"
5257

5358
#: ../../howto/pyporting.rst:19
5459
msgid ""
5560
"If you would like to read one core Python developer's take on why Python 3 "
5661
"came into existence, you can read Nick Coghlan's `Python 3 Q & A`_ or Brett "
5762
"Cannon's `Why Python 3 exists`_."
5863
msgstr ""
59-
"如果您想阅读一个核心Python开发人员对Python 3为什么会出现的看法,您可以阅读Nick Coghlan的 Python 3 Q&A或Brett"
60-
" Cannon的为什么Python 3存在。"
64+
"如果你想了解核心 Python 开发者对于 Python 3 的出现有何看法,你可以阅读 Nick Coghlan 的 `Python 3 Q & "
65+
"A`_ 或 Brett Cannon 的 `为什么要有 Python 3`_."
6166

6267
#: ../../howto/pyporting.rst:23
6368
msgid ""

reference/datamodel.po

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1951,6 +1951,9 @@ msgid ""
19511951
" ``x.__hash__()`` returns an appropriate value such that ``x == y`` implies "
19521952
"both that ``x is y`` and ``hash(x) == hash(y)``."
19531953
msgstr ""
1954+
"用户定义的类默认带有 :meth:`__eq__` 和 :meth:`__hash__` 方法;使用它们与任何对象(自己除外)比较必定不相等,并且 "
1955+
"``x.__hash__()`` 会返回一个恰当的值以确保 ``x == y`` 同时意味着 ``x is y`` 且 ``hash(x) == "
1956+
"hash(y)``。"
19541957

19551958
#: ../../reference/datamodel.rst:1425
19561959
msgid ""
@@ -1961,13 +1964,19 @@ msgid ""
19611964
"their hash value, and will also be correctly identified as unhashable when "
19621965
"checking ``isinstance(obj, collections.abc.Hashable)``."
19631966
msgstr ""
1967+
"一个类如果重载了 :meth:`__eq__` 且没有定义 :meth:`__hash__` 则会将其 :meth:`__hash__` 隐式地设为 "
1968+
"``None``。当一个类的 :meth:`__hash__` 方法为 ``None`` 时,该类的实例将在一个程序尝试获取其哈希值时正确地引发 "
1969+
":exc:`TypeError`,并会在检测 ``isinstance(obj, collections.abc.Hashable)`` "
1970+
"时被正确地识别为不可哈希对象。"
19641971

19651972
#: ../../reference/datamodel.rst:1432
19661973
msgid ""
19671974
"If a class that overrides :meth:`__eq__` needs to retain the implementation "
19681975
"of :meth:`__hash__` from a parent class, the interpreter must be told this "
19691976
"explicitly by setting ``__hash__ = <ParentClass>.__hash__``."
19701977
msgstr ""
1978+
"如果一个重载了 :meth:`__eq__` 的类需要保留来自父类的 :meth:`__hash__` 实现,则必须通过设置 ``__hash__ = "
1979+
"<ParentClass>.__hash__`` 来显式地告知解释器。"
19711980

19721981
#: ../../reference/datamodel.rst:1436
19731982
msgid ""
@@ -1977,6 +1986,9 @@ msgid ""
19771986
":exc:`TypeError` would be incorrectly identified as hashable by an "
19781987
"``isinstance(obj, collections.abc.Hashable)`` call."
19791988
msgstr ""
1989+
"如果一个没有重载 :meth:`__eq__` 的类需要去掉哈希支持,则应该在类定义中包含 ``__hash__ = None``。一个自定义了 "
1990+
":meth:`__hash__` 以显式地引发 :exc:`TypeError` 的类会被 ``isinstance(obj, "
1991+
"collections.abc.Hashable)`` 调用错误地识别为可哈希对象。"
19801992

19811993
#: ../../reference/datamodel.rst:1445
19821994
msgid ""

0 commit comments

Comments
 (0)