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

Skip to content

Commit bf964fc

Browse files
[po] auto sync
1 parent 882c005 commit bf964fc

3 files changed

Lines changed: 6704 additions & 6690 deletions

File tree

faq/design.po

Lines changed: 41 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ msgid ""
1515
msgstr ""
1616
"Project-Id-Version: Python 3.9\n"
1717
"Report-Msgid-Bugs-To: \n"
18-
"POT-Creation-Date: 2021-01-01 05:02+0000\n"
18+
"POT-Creation-Date: 2021-03-15 05:42+0000\n"
1919
"PO-Revision-Date: 2017-02-16 17:42+0000\n"
2020
"Last-Translator: Freesand Leo <[email protected]>, 2020\n"
2121
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -916,32 +916,40 @@ msgstr "为什么没有goto?"
916916

917917
#: ../../faq/design.rst:604
918918
msgid ""
919-
"You can use exceptions to provide a \"structured goto\" that even works "
920-
"across function calls. Many feel that exceptions can conveniently emulate "
919+
"In the 1970s people realized that unrestricted goto could lead to messy "
920+
"\"sphagetti\" code that was hard to understand and revise. In a high-level "
921+
"language, it is also unneeded as long as there are ways to branch (in "
922+
"Python, with ``if`` statements and ``or``, ``and``, and ``if-else`` "
923+
"expressions) and loop (with ``while`` and ``for`` statements, possibly "
924+
"containing ``continue`` and ``break``)."
925+
msgstr ""
926+
927+
#: ../../faq/design.rst:611
928+
msgid ""
929+
"One can also use exceptions to provide a \"structured goto\" that works even"
930+
" across function calls. Many feel that exceptions can conveniently emulate "
921931
"all reasonable uses of the \"go\" or \"goto\" constructs of C, Fortran, and "
922932
"other languages. For example::"
923933
msgstr ""
924-
"可以使用异常捕获来提供 “goto结构” ,甚至可以跨函数调用工作的 。许多人认为异常捕获可以方便地模拟C,Fortran和其他语言的 \"go\" 或"
925-
" \"goto\" 结构的所有合理用法。例如::"
926934

927-
#: ../../faq/design.rst:619
935+
#: ../../faq/design.rst:627
928936
msgid ""
929937
"This doesn't allow you to jump into the middle of a loop, but that's usually"
930938
" considered an abuse of goto anyway. Use sparingly."
931939
msgstr "但是不允许你跳到循环的中间,这通常被认为是滥用goto。谨慎使用。"
932940

933-
#: ../../faq/design.rst:624
941+
#: ../../faq/design.rst:632
934942
msgid "Why can't raw strings (r-strings) end with a backslash?"
935943
msgstr "为什么原始字符串(r-strings)不能以反斜杠结尾?"
936944

937-
#: ../../faq/design.rst:626
945+
#: ../../faq/design.rst:634
938946
msgid ""
939947
"More precisely, they can't end with an odd number of backslashes: the "
940948
"unpaired backslash at the end escapes the closing quote character, leaving "
941949
"an unterminated string."
942950
msgstr "更准确地说,它们不能以奇数个反斜杠结束:结尾处的不成对反斜杠会转义结束引号字符,留下未结束的字符串。"
943951

944-
#: ../../faq/design.rst:630
952+
#: ../../faq/design.rst:638
945953
msgid ""
946954
"Raw strings were designed to ease creating input for processors (chiefly "
947955
"regular expression engines) that want to do their own backslash escape "
@@ -953,33 +961,33 @@ msgstr ""
953961
"原始字符串的设计是为了方便想要执行自己的反斜杠转义处理的处理器(主要是正则表达式引擎)创建输入。此类处理器将不匹配的尾随反斜杠视为错误,因此原始字符串不允许这样做。反过来,允许通过使用引号字符转义反斜杠转义字符串"
954962
"。当r-string用于它们的预期目的时,这些规则工作的很好。"
955963

956-
#: ../../faq/design.rst:637
964+
#: ../../faq/design.rst:645
957965
msgid ""
958966
"If you're trying to build Windows pathnames, note that all Windows system "
959967
"calls accept forward slashes too::"
960968
msgstr "如果您正在尝试构建Windows路径名,请注意所有Windows系统调用都使用正斜杠::"
961969

962-
#: ../../faq/design.rst:642
970+
#: ../../faq/design.rst:650
963971
msgid ""
964972
"If you're trying to build a pathname for a DOS command, try e.g. one of ::"
965973
msgstr "如果您正在尝试为DOS命令构建路径名,请尝试以下示例 ::"
966974

967-
#: ../../faq/design.rst:650
975+
#: ../../faq/design.rst:658
968976
msgid "Why doesn't Python have a \"with\" statement for attribute assignments?"
969977
msgstr "为什么Python没有属性赋值的“with”语句?"
970978

971-
#: ../../faq/design.rst:652
979+
#: ../../faq/design.rst:660
972980
msgid ""
973981
"Python has a 'with' statement that wraps the execution of a block, calling "
974982
"code on the entrance and exit from the block. Some languages have a "
975983
"construct that looks like this::"
976984
msgstr "Python 具有 'with' 语句,它能将一个代码块的执行包装起来,在进入和退出代码块时调用特定的代码。 有些语言具有这样的结构::"
977985

978-
#: ../../faq/design.rst:660
986+
#: ../../faq/design.rst:668
979987
msgid "In Python, such a construct would be ambiguous."
980988
msgstr "在Python中,这样的结构是不明确的。"
981989

982-
#: ../../faq/design.rst:662
990+
#: ../../faq/design.rst:670
983991
msgid ""
984992
"Other languages, such as Object Pascal, Delphi, and C++, use static types, "
985993
"so it's possible to know, in an unambiguous way, what member is being "
@@ -989,7 +997,7 @@ msgstr ""
989997
"其他语言,如ObjectPascal、Delphi和C++ 使用静态类型,因此可以毫不含糊地知道分配给什么成员。这是静态类型的要点 -- 编译器 "
990998
"*总是* 在编译时知道每个变量的作用域。"
991999

992-
#: ../../faq/design.rst:667
1000+
#: ../../faq/design.rst:675
9931001
msgid ""
9941002
"Python uses dynamic types. It is impossible to know in advance which "
9951003
"attribute will be referenced at runtime. Member attributes may be added or "
@@ -999,11 +1007,11 @@ msgid ""
9991007
msgstr ""
10001008
"Python使用动态类型。事先不可能知道在运行时引用哪个属性。可以动态地在对象中添加或删除成员属性。这使得无法通过简单的阅读就知道引用的是什么属性:局部属性、全局属性还是成员属性?"
10011009

1002-
#: ../../faq/design.rst:673
1010+
#: ../../faq/design.rst:681
10031011
msgid "For instance, take the following incomplete snippet::"
10041012
msgstr "例如,采用以下不完整的代码段::"
10051013

1006-
#: ../../faq/design.rst:679
1014+
#: ../../faq/design.rst:687
10071015
msgid ""
10081016
"The snippet assumes that \"a\" must have a member attribute called \"x\". "
10091017
"However, there is nothing in Python that tells the interpreter this. What "
@@ -1014,89 +1022,89 @@ msgstr ""
10141022
"该代码段假设 \"a\" 必须有一个名为 \"x\" 的成员属性。然而,Python中并没有告诉解释器这一点。假设 \"a\" "
10151023
"是整数,会发生什么?如果有一个名为 \"x\" 的全局变量,它是否会在with块中使用?如您所见,Python的动态特性使得这样的选择更加困难。"
10161024

1017-
#: ../../faq/design.rst:685
1025+
#: ../../faq/design.rst:693
10181026
msgid ""
10191027
"The primary benefit of \"with\" and similar language features (reduction of "
10201028
"code volume) can, however, easily be achieved in Python by assignment. "
10211029
"Instead of::"
10221030
msgstr "然而,Python 可以通过赋值轻松实现 \"with\" 和类似语言特性(减少代码量)的主要好处。代替::"
10231031

1024-
#: ../../faq/design.rst:692
1032+
#: ../../faq/design.rst:700
10251033
msgid "write this::"
10261034
msgstr "写成这样::"
10271035

1028-
#: ../../faq/design.rst:699
1036+
#: ../../faq/design.rst:707
10291037
msgid ""
10301038
"This also has the side-effect of increasing execution speed because name "
10311039
"bindings are resolved at run-time in Python, and the second version only "
10321040
"needs to perform the resolution once."
10331041
msgstr "这也具有提高执行速度的副作用,因为Python在运行时解析名称绑定,而第二个版本只需要执行一次解析。"
10341042

1035-
#: ../../faq/design.rst:705
1043+
#: ../../faq/design.rst:713
10361044
msgid "Why are colons required for the if/while/def/class statements?"
10371045
msgstr "为什么 if/while/def/class语句需要冒号? "
10381046

1039-
#: ../../faq/design.rst:707
1047+
#: ../../faq/design.rst:715
10401048
msgid ""
10411049
"The colon is required primarily to enhance readability (one of the results "
10421050
"of the experimental ABC language). Consider this::"
10431051
msgstr "冒号主要用于增强可读性(ABC语言实验的结果之一)。考虑一下这个::"
10441052

1045-
#: ../../faq/design.rst:713
1053+
#: ../../faq/design.rst:721
10461054
msgid "versus ::"
10471055
msgstr "与 ::"
10481056

1049-
#: ../../faq/design.rst:718
1057+
#: ../../faq/design.rst:726
10501058
msgid ""
10511059
"Notice how the second one is slightly easier to read. Notice further how a "
10521060
"colon sets off the example in this FAQ answer; it's a standard usage in "
10531061
"English."
10541062
msgstr "注意第二种方法稍微容易一些。请进一步注意,在这个FAQ解答的示例中,冒号是如何设置的;这是英语中的标准用法。"
10551063

1056-
#: ../../faq/design.rst:721
1064+
#: ../../faq/design.rst:729
10571065
msgid ""
10581066
"Another minor reason is that the colon makes it easier for editors with "
10591067
"syntax highlighting; they can look for colons to decide when indentation "
10601068
"needs to be increased instead of having to do a more elaborate parsing of "
10611069
"the program text."
10621070
msgstr "另一个次要原因是冒号使带有语法突出显示的编辑器更容易工作;他们可以寻找冒号来决定何时需要增加缩进,而不必对程序文本进行更精细的解析。"
10631071

1064-
#: ../../faq/design.rst:727
1072+
#: ../../faq/design.rst:735
10651073
msgid "Why does Python allow commas at the end of lists and tuples?"
10661074
msgstr "为什么Python在列表和元组的末尾允许使用逗号?"
10671075

1068-
#: ../../faq/design.rst:729
1076+
#: ../../faq/design.rst:737
10691077
msgid ""
10701078
"Python lets you add a trailing comma at the end of lists, tuples, and "
10711079
"dictionaries::"
10721080
msgstr "Python 允许您在列表,元组和字典的末尾添加一个尾随逗号::"
10731081

1074-
#: ../../faq/design.rst:740
1082+
#: ../../faq/design.rst:748
10751083
msgid "There are several reasons to allow this."
10761084
msgstr "有几个理由允许这样做。"
10771085

1078-
#: ../../faq/design.rst:742
1086+
#: ../../faq/design.rst:750
10791087
msgid ""
10801088
"When you have a literal value for a list, tuple, or dictionary spread across"
10811089
" multiple lines, it's easier to add more elements because you don't have to "
10821090
"remember to add a comma to the previous line. The lines can also be "
10831091
"reordered without creating a syntax error."
10841092
msgstr "如果列表,元组或字典的字面值分布在多行中,则更容易添加更多元素,因为不必记住在上一行中添加逗号。这些行也可以重新排序,而不会产生语法错误。"
10851093

1086-
#: ../../faq/design.rst:747
1094+
#: ../../faq/design.rst:755
10871095
msgid ""
10881096
"Accidentally omitting the comma can lead to errors that are hard to "
10891097
"diagnose. For example::"
10901098
msgstr "不小心省略逗号会导致难以诊断的错误。例如::"
10911099

1092-
#: ../../faq/design.rst:757
1100+
#: ../../faq/design.rst:765
10931101
msgid ""
10941102
"This list looks like it has four elements, but it actually contains three: "
10951103
"\"fee\", \"fiefoo\" and \"fum\". Always adding the comma avoids this source"
10961104
" of error."
10971105
msgstr "这个列表看起来有四个元素,但实际上包含三个 : \"fee\", \"fiefoo\"\"fum\" 。总是加上逗号可以避免这个错误的来源。"
10981106

1099-
#: ../../faq/design.rst:760
1107+
#: ../../faq/design.rst:768
11001108
msgid ""
11011109
"Allowing the trailing comma may also make programmatic code generation "
11021110
"easier."

tutorial/inputoutput.po

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -131,44 +131,44 @@ msgid ""
131131
"prefixing the string with ``f`` or ``F`` and writing expressions as "
132132
"``{expression}``."
133133
msgstr ""
134-
":ref:`格式化字符串字面值 <f-strings>` (常简称为 f-字符串)能让你在字符串前加上 ``f`` ``F`` 并将表达式写成 "
135-
"``{expression}`` 来在字符串中包含 Python 表达式的值。"
134+
":ref:`格式化字符串字面值 <f-strings>` (简称为 f-字符串)在字符串前添加前缀 ``f`` ``F``,通赤 "
135+
"``{expression}`` 的形式输入表达式,从而把 Python 表达式的值包含在字符串内。"
136136

137137
#: ../../tutorial/inputoutput.rst:107
138138
msgid ""
139139
"An optional format specifier can follow the expression. This allows greater "
140140
"control over how the value is formatted. The following example rounds pi to "
141141
"three places after the decimal::"
142-
msgstr "可选的格式说明符可以跟在表达式后面。这样可以更好地控制值的格式化方式。以下示例将pi舍入到小数点后三位::"
142+
msgstr "格式说明符在表达式后面,是可选的,该说明符可以更好地控制值的格式化方式。下例将 pi 舍入到小数点后三位:"
143143

144144
#: ../../tutorial/inputoutput.rst:115
145145
msgid ""
146146
"Passing an integer after the ``':'`` will cause that field to be a minimum "
147147
"number of characters wide. This is useful for making columns line up. ::"
148-
msgstr "在 ``':'`` 后传递一个整数可以让该字段成为最小字符宽度。这在使列对齐时很有用。::"
148+
msgstr "在 ``':'`` 后传递整数,为该字段设置最小字符宽度。这种操作常用于列对齐:"
149149

150150
#: ../../tutorial/inputoutput.rst:126
151151
msgid ""
152152
"Other modifiers can be used to convert the value before it is formatted. "
153153
"``'!a'`` applies :func:`ascii`, ``'!s'`` applies :func:`str`, and ``'!r'`` "
154154
"applies :func:`repr`::"
155155
msgstr ""
156-
"其他的修饰符可用于在格式化之前转化值。 ``'!a'`` 应用 :func:`ascii` ,``'!s'`` 应用 :func:`str`,还有 "
157-
"``'!r'`` 应用 :func:`repr`::"
156+
"下述修饰符用于在格式化前转换值。 ``'!a'`` 应用 :func:`ascii` ,``'!s'`` 应用 :func:`str`,``'!r'``"
157+
" 应用 :func:`repr`"
158158

159159
#: ../../tutorial/inputoutput.rst:136
160160
msgid ""
161161
"For a reference on these format specifications, see the reference guide for "
162162
"the :ref:`formatspec`."
163-
msgstr "有关这些格式规范的参考,请参阅参考指南 :ref:`formatspec`。"
163+
msgstr "有关格式规范的参考,详见参考指南 :ref:`formatspec`。"
164164

165165
#: ../../tutorial/inputoutput.rst:142
166166
msgid "The String format() Method"
167-
msgstr "字符串的 format() 方法"
167+
msgstr "字符串 format() 方法"
168168

169169
#: ../../tutorial/inputoutput.rst:144
170170
msgid "Basic usage of the :meth:`str.format` method looks like this::"
171-
msgstr ":meth:`str.format` 方法的基本用法如下所示::"
171+
msgstr ":meth:`str.format` 方法的基本用法如下所示"
172172

173173
#: ../../tutorial/inputoutput.rst:149
174174
msgid ""

0 commit comments

Comments
 (0)