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

Skip to content

Commit ea11283

Browse files
committed
[po] auto sync bot
1 parent 876c098 commit ea11283

2 files changed

Lines changed: 18 additions & 3 deletions

File tree

faq/programming.po

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,10 @@ msgid ""
692692
" copy of ``y``, you'll instead end up with ``None``, which will likely cause"
693693
" your program to generate an easily diagnosed error."
694694
msgstr ""
695+
"某些操作 (例如 ``y.append(10)`` 和 ``y.sort()``) 是改变原对象,而看上去相似的另一些操作 (例如 ``y = y + "
696+
"[10]`` 和 ``sorted(y)``) 则是创建新对象。 通常在 Python 中 (以及在标准库的所有代码中) 会改变原对象的方法将返回 "
697+
"``None`` 以帮助避免混淆这两种不同类型的操作。 因此如果你错误地使用了 ``y.sort()`` 并期望它将返回一个经过排序的 ``y`` "
698+
"的副本,你得到的结果将会是 ``None``,这将导致你的程序产生一个容易诊断的错误。"
695699

696700
#: ../../faq/programming.rst:490
697701
msgid ""
@@ -702,6 +706,9 @@ msgid ""
702706
"mutates ``a_list``, whereas ``some_tuple += (1, 2, 3)`` and ``some_int += "
703707
"1`` create new objects)."
704708
msgstr ""
709+
"但是,还存在一类操作,不同的类型执行相同的操作会有不同的行为:那就是增强赋值运算符。 例如,``+=`` 会原地改变列表,但不会改变元组或整数 "
710+
"(``a_list += [1, 2, 3]`` 与 ``a_list.extend([1, 2, 3])`` 一样都会改变 ``a_list``,而 "
711+
"``some_tuple += (1, 2, 3)`` 和 ``some_int += 1`` 则会创建新的对象)。"
705712

706713
#: ../../faq/programming.rst:497
707714
msgid "In other words:"
@@ -713,6 +720,8 @@ msgid ""
713720
"etc.), we can use some specific operations to mutate it and all the "
714721
"variables that refer to it will see the change."
715722
msgstr ""
723+
"如果我们有一个可变对象 (:class:`list`, :class:`dict`, :class:`set` "
724+
"等等),我们可以使用某些特定的操作来改变它,所有指向它的变量都会显示它的改变。"
716725

717726
#: ../../faq/programming.rst:502
718727
msgid ""
@@ -721,12 +730,14 @@ msgid ""
721730
"but operations that transform that value into a new value always return a "
722731
"new object."
723732
msgstr ""
733+
"如果我们有一个不可变对象 (:class:`str`, :class:`int`, :class:`tuple` "
734+
"等等),所有指向它的变量都将显示相同样的值,但凡是会改变这个值的操作将总是返回一个新对象。"
724735

725736
#: ../../faq/programming.rst:507
726737
msgid ""
727738
"If you want to know if two variables refer to the same object or not, you "
728739
"can use the :keyword:`is` operator, or the built-in function :func:`id`."
729-
msgstr ""
740+
msgstr "如果你想知道两个变量是否指向相同的对象,你可以使用 :keyword:`is` 运算符,或内置函数 :func:`id`。"
730741

731742
#: ../../faq/programming.rst:512
732743
msgid "How do I write a function with output parameters (call by reference)?"

using/cmdline.po

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
# Translators:
77
# Trim21 <[email protected]>, 2019
88
# cdarlint <[email protected]>, 2019
9-
# Freesand Leo <[email protected]>, 2019
109
# ppcfish <[email protected]>, 2019
10+
# Freesand Leo <[email protected]>, 2019
1111
#
1212
#, fuzzy
1313
msgid ""
@@ -16,7 +16,7 @@ msgstr ""
1616
"Report-Msgid-Bugs-To: \n"
1717
"POT-Creation-Date: 2019-01-01 10:14+0900\n"
1818
"PO-Revision-Date: 2017-02-16 23:41+0000\n"
19-
"Last-Translator: ppcfish <ppcfish@gmail.com>, 2019\n"
19+
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2019\n"
2020
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
2121
"MIME-Version: 1.0\n"
2222
"Content-Type: text/plain; charset=UTF-8\n"
@@ -753,6 +753,8 @@ msgid ""
753753
" :file:`{prefix}/lib/python{version}` (see :envvar:`PYTHONHOME` above). It "
754754
"is *always* appended to :envvar:`PYTHONPATH`."
755755
msgstr ""
756+
"默认索引路径依赖于安装路径,但通常都是以 :file:`{prefix}/lib/python{version}` 开始 (参见上文中的 "
757+
":envvar:`PYTHONHOME`)。 它 *总是* 会被添加到 :envvar:`PYTHONPATH`。"
756758

757759
#: ../../using/cmdline.rst:513
758760
msgid ""
@@ -761,6 +763,8 @@ msgid ""
761763
"options`. The search path can be manipulated from within a Python program as"
762764
" the variable :data:`sys.path`."
763765
msgstr ""
766+
"有一个附加目录将被插入到索引路径的 :envvar:`PYTHONPATH` 之前,正如上文中 :ref:`using-on-interface-"
767+
"options` 所描述的。 搜索路径可以在 Python 程序内作为变量 :data:`sys.path` 来进行操作。"
764768

765769
#: ../../using/cmdline.rst:521
766770
msgid ""

0 commit comments

Comments
 (0)