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

Skip to content

Commit 7adecf3

Browse files
[po] auto sync
1 parent 9cc76a1 commit 7adecf3

1 file changed

Lines changed: 17 additions & 18 deletions

File tree

faq/programming.po

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -976,61 +976,60 @@ msgid ""
976976
"on their position. For example, :func:`divmod` is a function that accepts "
977977
"positional-only parameters. Its documentation looks like this::"
978978
msgstr ""
979-
"函数参数列表中的斜杠表示在它之前的形参是仅限位置形参。 仅限位置形参没有外部可用的名称。 "
980-
"在调用接受仅限位置形参的函数时,参数只会基于它们的位置被映射到形参。 例如,:func:`divmod` 是一个接受仅限位置形参的函数。 "
981-
"它的文档是这样的::"
979+
"函数参数列表中的斜杠表示在它之前的形参全都仅限位置形参。仅限位置形参没有可供外部使用的名称。在调用仅接受位置形参的函数时,实参只会根据位置映射到形参上。假定"
980+
" :func:`divmod` 是一个仅接受位置形参的函数。 它的帮助文档如下所示:"
982981

983982
#: ../../faq/programming.rst:781
984983
msgid ""
985984
"The slash at the end of the parameter list means that both parameters are "
986985
"positional-only. Thus, calling :func:`divmod` with keyword arguments would "
987986
"lead to an error::"
988-
msgstr "在形参列表末尾的斜杠意味着两个形参都是仅限位置形参。 因此,附带关键字参数调用 :func:`divmod` 将会导致报错::"
987+
msgstr "形参列表尾部的斜杠说明,两个形参都是仅限位置形参。因此,用关键字参数调用 :func:`divmod` 将会引发错误:"
989988

990989
#: ../../faq/programming.rst:792
991990
msgid "Numbers and strings"
992991
msgstr "数字和字符串"
993992

994993
#: ../../faq/programming.rst:795
995994
msgid "How do I specify hexadecimal and octal integers?"
996-
msgstr "如何指定十六进制和八进制整数?"
995+
msgstr "如何给出十六进制和八进制整数?"
997996

998997
#: ../../faq/programming.rst:797
999998
msgid ""
1000999
"To specify an octal digit, precede the octal value with a zero, and then a "
10011000
"lower or uppercase \"o\". For example, to set the variable \"a\" to the "
10021001
"octal value \"10\" (8 in decimal), type::"
10031002
msgstr ""
1004-
"要指定一个八进制数码,则在八进制值之前加一个零和一个小写或大写字母 \"o\" 作为前缀。 例如,要将变量 \"a\" 设为八进制的 \"10\" "
1005-
"(十进制的 8),就输入::"
1003+
"要给出八进制数,需在八进制数值前面加上一个零和一个小写或大写字母 \"o\" 作为前缀。例如,要将变量 \"a\" 设为八进制的 \"10\" "
1004+
"十进制的 8),写法如下:"
10061005

10071006
#: ../../faq/programming.rst:805
10081007
msgid ""
10091008
"Hexadecimal is just as easy. Simply precede the hexadecimal number with a "
10101009
"zero, and then a lower or uppercase \"x\". Hexadecimal digits can be "
10111010
"specified in lower or uppercase. For example, in the Python interpreter::"
10121011
msgstr ""
1013-
"十六进制数也同样简单。 只要在十六进制数之前加一个零和一个小写或大写字母 \"x\" 十六进制数码中的字母可以为大写或小写。 例如在 Python "
1014-
"解释器中输入::"
1012+
"十六进制数也很简单。只要在十六进制数前面加上一个零和一个小写或大写的字母 \"x\"十六进制数中的字母可以为大写或小写。比如在 Python "
1013+
"解释器中输入"
10151014

10161015
#: ../../faq/programming.rst:818
10171016
msgid "Why does -22 // 10 return -3?"
1018-
msgstr "为什么-22 // 10返回-3?"
1017+
msgstr "为什么 -22 // 10 会返回 -3 ?"
10191018

10201019
#: ../../faq/programming.rst:820
10211020
msgid ""
10221021
"It's primarily driven by the desire that ``i % j`` have the same sign as "
10231022
"``j``. If you want that, and also want::"
1024-
msgstr "这主要是为了让 ``i % j`` 的正负与 ``j`` 一致,如果你想要这样的结果,并且又想要::"
1023+
msgstr "这主要是为了让 ``i % j`` 的正负与 ``j`` 一致,如果期望如此,且期望如下等式成立:"
10251024

10261025
#: ../../faq/programming.rst:825
10271026
msgid ""
10281027
"then integer division has to return the floor. C also requires that "
10291028
"identity to hold, and then compilers that truncate ``i // j`` need to make "
10301029
"``i % j`` have the same sign as ``i``."
10311030
msgstr ""
1032-
"那么整除就必须向下取整。 C 同样要求保持一致,并且编译器在截短 ``i // j`` 的结果值时需要使 ``i % j`` 的正负与 ``i`` "
1033-
"一致。"
1031+
"那么整除就必须返回向下取整的结果。C 语言同样要求保持这种一致性,于是编译器在截断 ``i // j`` 的结果时需要让 ``i % j`` 的正负与 "
1032+
"``i`` 一致。"
10341033

10351034
#: ../../faq/programming.rst:829
10361035
msgid ""
@@ -1079,18 +1078,18 @@ msgid ""
10791078
"``__import__('os').system(\"rm -rf $HOME\")`` which would erase your home "
10801079
"directory."
10811080
msgstr ""
1082-
"如果你只是想将字符串转为数字,请不要使用内置函数 :func:`eval`。 :func:`eval` "
1083-
"的速度会慢很多并且有安全风险:别人可能会传入具有你不想要的附带效果的 Python 表达式。 例如,别人可以传入 "
1084-
"``__import__('os').system(\"rm -rf $HOME\")`` 这将删除你的家目录。"
1081+
"如果只是想把字符串转为数字,请不要使用内置函数 :func:`eval`。 :func:`eval` "
1082+
"的速度慢很多且存在安全风险:别人可能会传入带有不良副作用的 Python 表达式。比如可能会传入 "
1083+
"``__import__('os').system(\"rm -rf $HOME\")`` ,这会把 home 目录给删了。"
10851084

10861085
#: ../../faq/programming.rst:857
10871086
msgid ""
10881087
":func:`eval` also has the effect of interpreting numbers as Python "
10891088
"expressions, so that e.g. ``eval('09')`` gives a syntax error because Python"
10901089
" does not allow leading '0' in a decimal number (except '0')."
10911090
msgstr ""
1092-
":func:`eval` 还具有将数字解读为 Python 表达式的效果,这样 ``eval('09')`` 将会导致语法错误,因为 Python "
1093-
"不允许十进制数的首位是 '0' ('0' 除外)。"
1091+
":func:`eval` 还有把数字解析为 Python 表达式的后果,因此如 ``eval('09')`` 将会导致语法错误,因为 Python "
1092+
"不允许十进制数带有前导 '0''0' 除外。"
10941093

10951094
#: ../../faq/programming.rst:863
10961095
msgid "How do I convert a number to a string?"

0 commit comments

Comments
 (0)