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

Skip to content

Commit da9c02d

Browse files
committed
[po] auto sync bot
1 parent 439e052 commit da9c02d

2 files changed

Lines changed: 21 additions & 4 deletions

File tree

faq/extending.po

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#
66
# Translators:
77
# ppcfish <[email protected]>, 2019
8+
# Freesand Leo <[email protected]>, 2019
89
#
910
#, fuzzy
1011
msgid ""
@@ -13,7 +14,7 @@ msgstr ""
1314
"Report-Msgid-Bugs-To: \n"
1415
"POT-Creation-Date: 2019-04-13 11:09+0900\n"
1516
"PO-Revision-Date: 2017-02-16 17:43+0000\n"
16-
"Last-Translator: ppcfish <ppcfish@gmail.com>, 2019\n"
17+
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2019\n"
1718
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
1819
"MIME-Version: 1.0\n"
1920
"Content-Type: text/plain; charset=UTF-8\n"
@@ -99,7 +100,7 @@ msgstr ""
99100

100101
#: ../../faq/extending.rst:61
101102
msgid "How can I execute arbitrary Python statements from C?"
102-
msgstr "如何从C执行任意Python语句?"
103+
msgstr "如何在 C 中执行任意 Python 语句?"
103104

104105
#: ../../faq/extending.rst:63
105106
msgid ""
@@ -110,17 +111,23 @@ msgid ""
110111
":c:func:`PyRun_String`; see the source for :c:func:`PyRun_SimpleString` in "
111112
"``Python/pythonrun.c``."
112113
msgstr ""
114+
"执行此操作的最高层级函数为 :c:func:`PyRun_SimpleString`,它接受单个字符串参数用于在模块 ``__main__`` "
115+
"的上下文中执行并在成功时返回 ``0`` 而在发生异常 (包括 :exc:`SyntaxError`) 时返回 ``-1``。 "
116+
"如果你想要更多可控性,可以使用 :c:func:`PyRun_String`;请在 ``Python/pythonrun.c`` 中查看 "
117+
":c:func:`PyRun_SimpleString` 的源码。"
113118

114119
#: ../../faq/extending.rst:72
115120
msgid "How can I evaluate an arbitrary Python expression from C?"
116-
msgstr "如何从C中评估任意Python表达式?"
121+
msgstr "如何在 C 中对任意 Python 表达式求值?"
117122

118123
#: ../../faq/extending.rst:74
119124
msgid ""
120125
"Call the function :c:func:`PyRun_String` from the previous question with the"
121126
" start symbol :c:data:`Py_eval_input`; it parses an expression, evaluates it"
122127
" and returns its value."
123128
msgstr ""
129+
"可以调用前一问题中介绍的函数 :c:func:`PyRun_String` 并附带起始标记符 "
130+
":c:data:`Py_eval_input`;它会解析表达式,对其求值并返回结果值。"
124131

125132
#: ../../faq/extending.rst:80
126133
msgid "How do I extract C values from a Python object?"

faq/programming.po

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2184,26 +2184,34 @@ msgid ""
21842184
" ``xyz`` because ``xyz`` is imported, but no ``.pyc`` file will be created "
21852185
"for ``foo`` since ``foo.py`` isn't being imported."
21862186
msgstr ""
2187+
"在最高层级运行的 Python 脚本不被视为导入,因此不会创建 ``.pyc`` 文件。 例如,如果你有一个最高层级模块文件 "
2188+
"``foo.py``,它又导入了另一个模块 ``xyz.py``,当你运行 ``foo`` 模块 (通过输入终端命令 ``python "
2189+
"foo.py``),则将为 ``xyz`` 创建一个 ``.pyc``,因为 ``xyz`` 是被导入的,但不会为 ``foo`` 创建 "
2190+
"``.pyc`` 文件,因为 ``foo.py`` 不是被导入的。"
21872191

21882192
#: ../../faq/programming.rst:1763
21892193
msgid ""
21902194
"If you need to create a ``.pyc`` file for ``foo`` -- that is, to create a "
21912195
"``.pyc`` file for a module that is not imported -- you can, using the "
21922196
":mod:`py_compile` and :mod:`compileall` modules."
21932197
msgstr ""
2198+
"如果你需要为 ``foo`` 创建 ``.pyc`` 文件 —— 即为不是被导入的模块创建 ``.pyc`` 文件 —— 你可以使用 "
2199+
":mod:`py_compile` 和 :mod:`compileall` 模块。"
21942200

21952201
#: ../../faq/programming.rst:1767
21962202
msgid ""
21972203
"The :mod:`py_compile` module can manually compile any module. One way is to"
21982204
" use the ``compile()`` function in that module interactively::"
2199-
msgstr ""
2205+
msgstr ":mod:`py_compile` 模块能够手动编译任意模块。 一种做法是交互式地使用该模块中的 ``compile()`` 函数::"
22002206

22012207
#: ../../faq/programming.rst:1773
22022208
msgid ""
22032209
"This will write the ``.pyc`` to a ``__pycache__`` subdirectory in the same "
22042210
"location as ``foo.py`` (or you can override that with the optional parameter"
22052211
" ``cfile``)."
22062212
msgstr ""
2213+
"这将会将 ``.pyc`` 文件写入与 ``foo.py`` 相同位置下的 ``__pycache__`` 子目录(或者你也可以通过可选参数 "
2214+
"``cfile`` 来重载该行为)。"
22072215

22082216
#: ../../faq/programming.rst:1777
22092217
msgid ""
@@ -2212,6 +2220,8 @@ msgid ""
22122220
"running ``compileall.py`` and providing the path of a directory containing "
22132221
"Python files to compile::"
22142222
msgstr ""
2223+
"你还可以使用 :mod:`compileall` 模块自动编译一个目录或多个目录下的所有文件。 具体做法可以是在命令行提示符中运行 "
2224+
"``compileall.py`` 并提供包含要编译 Python 文件的目录路径::"
22152225

22162226
#: ../../faq/programming.rst:1786
22172227
msgid "How do I find the current module name?"

0 commit comments

Comments
 (0)