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

Skip to content

Commit be81b2a

Browse files
committed
[po] auto sync bot
1 parent d3a426f commit be81b2a

2 files changed

Lines changed: 23 additions & 5 deletions

File tree

howto/argparse.po

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +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+
#
610
#, fuzzy
711
msgid ""
812
msgstr ""
913
"Project-Id-Version: Python 3.7\n"
1014
"Report-Msgid-Bugs-To: \n"
1115
"POT-Creation-Date: 2018-06-30 05:56+0900\n"
12-
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13-
"Last-Translator: Chengeng Ning <telnetning@gmail.com>, 2018\n"
16+
"PO-Revision-Date: 2017-02-16 17:44+0000\n"
17+
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2018\n"
1418
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
1519
"MIME-Version: 1.0\n"
1620
"Content-Type: text/plain; charset=UTF-8\n"
@@ -20,7 +24,7 @@ msgstr ""
2024

2125
#: ../../howto/argparse.rst:3
2226
msgid "Argparse Tutorial"
23-
msgstr "Argparse教程"
27+
msgstr "Argparse 教程"
2428

2529
#: ../../howto/argparse.rst:0
2630
msgid "author"
@@ -34,7 +38,7 @@ msgstr "Tshepang Lekhonkhobe"
3438
msgid ""
3539
"This tutorial is intended to be a gentle introduction to :mod:`argparse`, "
3640
"the recommended command-line parsing module in the Python standard library."
37-
msgstr "这篇教程旨在简单地介绍`argparse`模块,argparse是Python标准库推荐的命令行解析模块。"
41+
msgstr "这篇教程旨在作为 :mod:`argparse` 的入门介绍,此模块是 Python 标准库中推荐的命令行解析模块。"
3842

3943
#: ../../howto/argparse.rst:14
4044
msgid ""
@@ -43,10 +47,13 @@ msgid ""
4347
" :mod:`optparse`. Note also that :mod:`argparse` is based on "
4448
":mod:`optparse`, and therefore very similar in terms of usage."
4549
msgstr ""
50+
"还有另外两个模块可以完成同样的任务,它们的名字是 :mod:`getopt` (对应于 C 语言中的 :c:func:`getopt` 函数) "
51+
"以及已弃用的 :mod:`optparse`. 还要注意 :mod:`argparse` 是基于 :mod:`optparse` "
52+
"的,因此在用法上与其非常相似。"
4653

4754
#: ../../howto/argparse.rst:22
4855
msgid "Concepts"
49-
msgstr ""
56+
msgstr "概念"
5057

5158
#: ../../howto/argparse.rst:24
5259
msgid ""

reference/datamodel.po

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1910,6 +1910,9 @@ msgid ""
19101910
"that also play a part in comparison of objects by packing them into a tuple "
19111911
"and hashing the tuple. Example::"
19121912
msgstr ""
1913+
"通过内置函数 :func:`hash` 调用以对哈希集的成员进行操作,属于哈希集的类型包括 "
1914+
":class:`set`、:class:`frozenset` 以及 :class:`dict`。:meth:`__hash__` "
1915+
"应该返回一个整数。对象比较结果相同所需的唯一特征属性是其具有相同的哈希值;建议的做法是把参与比较的对象全部组件的哈希值混在一起,即将它们打包为一个元组并对该元组做哈希运算。例如::"
19131916

19141917
#: ../../reference/datamodel.rst:1403
19151918
msgid ""
@@ -1920,6 +1923,10 @@ msgid ""
19201923
"sizes, be sure to check the width on all supported builds. An easy way to "
19211924
"do this is with ``python -c \"import sys; print(sys.hash_info.width)\"``."
19221925
msgstr ""
1926+
":func:`hash` 会从一个对象自定义的 :meth:`__hash__` 方法返回值中截断为 :c:type:`Py_ssize_t` "
1927+
"的大小。通常对 64 位构建为 8 字节,对 32 位构建为 4 字节。如果一个对象的 :meth:`__hash__` "
1928+
"必须在不同位大小的构建上进行互操作,请确保检查全部所支持构建的宽度。做到这一点的简单方法是使用 ``python -c \"import sys; "
1929+
"print(sys.hash_info.width)\"``。"
19231930

19241931
#: ../../reference/datamodel.rst:1411
19251932
msgid ""
@@ -1932,6 +1939,10 @@ msgid ""
19321939
"immutable (if the object's hash value changes, it will be in the wrong hash "
19331940
"bucket)."
19341941
msgstr ""
1942+
"如果一个类没有定义 :meth:`__eq__` 方法,那么也不应该定义 :meth:`__hash__` 操作;如果它定义了 "
1943+
":meth:`__eq__` 但没有定义 :meth:`__hash__`,则其实例将不可被用作可哈希集的项。如果一个类定义了可变对象并实现了 "
1944+
":meth:`__eq__` 方法,则不应该实现 "
1945+
":meth:`__hash__`,因为可哈希集的实现要求键的哈希集是不可变的(如果对象的哈希值发生改变,它将处于错误的哈希桶中)。"
19351946

19361947
#: ../../reference/datamodel.rst:1420
19371948
msgid ""

0 commit comments

Comments
 (0)