55#
66# Translators:
77# Junkai Shao <[email protected] >, 20188- # Shengjing Zhu <[email protected] >, 201998# Freesand Leo <[email protected] >, 2020109# jaystone776 <[email protected] >, 20211110#
@@ -33,7 +32,7 @@ msgid ""
3332"There are several ways to present the output of a program; data can be "
3433"printed in a human-readable form, or written to a file for future use. This "
3534"chapter will discuss some of the possibilities."
36- msgstr "程序输出可以用几种方式显示;数据能输出为人类可读的形式 ,也可以写入文件备用。本章探讨一些可用的方式。"
35+ msgstr "程序输出有几种显示方式;数据既可以输出为人类可读的形式 ,也可以写入文件备用。本章探讨一些可用的方式。"
3736
3837#: ../../tutorial/inputoutput.rst:15
3938msgid "Fancier Output Formatting"
@@ -54,7 +53,7 @@ msgid ""
5453"Often you'll want more control over the formatting of your output than "
5554"simply printing space-separated values. There are several ways to format "
5655"output."
57- msgstr "通常,你需要更多地控制输出的格式,而不仅仅是打印空格分隔的值。有几种格式化输出的方法 。"
56+ msgstr "对输出格式的控制不只是打印空格分隔的值,还需要更多方式。格式化输出有以下几种方法 。"
5857
5958#: ../../tutorial/inputoutput.rst:25
6059msgid ""
@@ -63,8 +62,8 @@ msgid ""
6362"Inside this string, you can write a Python expression between ``{`` and "
6463"``}`` characters that can refer to variables or literal values."
6564msgstr ""
66- "要使用 :ref:`格式化字符串字面值 <tut-f-strings>` ,请在字符串的开始引号或三引号之前加上一个 ``f`` 或 ``F`` "
67- "。在此字符串中,你可以在 ``{`` 和 ``}`` 字符之间写可以引用的变量或字面值的 Python 表达式。"
65+ "使用 :ref:`格式化字符串字面值 <tut-f-strings>` ,要在字符串开头的引号或三引号前添加 ``f`` 或 ``F`` "
66+ "。在此字符串中,可以在 ``{`` 和 ``}`` 字符之间输入引用的变量或字面值的 Python 表达式。"
6867
6968#: ../../tutorial/inputoutput.rst:37
7069msgid ""
@@ -73,8 +72,8 @@ msgid ""
7372"substituted and can provide detailed formatting directives, but you'll also "
7473"need to provide the information to be formatted."
7574msgstr ""
76- "字符串的 :meth:`str.format` 方法需要更多的手动操作。你仍将使用 ``{`` 和 ``}`` "
77- "来标记变量将被替换的位置,并且可以提供详细的格式化指令,但你还需要提供要格式化的信息 。"
75+ "字符串的 :meth:`str.format` 方法需要更多的手动操作。该方法仍使用 ``{`` 和 ``}`` "
76+ "标记要替换的变量的位置,该方法还支持详细的格式化指令,但需要提供格式化信息 。"
7877
7978#: ../../tutorial/inputoutput.rst:50
8079msgid ""
@@ -83,15 +82,14 @@ msgid ""
8382"string type has some methods that perform useful operations for padding "
8483"strings to a given column width."
8584msgstr ""
86- "最后,你可以使用字符串切片和连接操作自己完成所有的字符串处理,以创建你可以想象的任何布局。字符串类型有一些方法可以执行将字符串填充到给定列宽的有用操作 。"
85+ "最后,还可以用字符串切片和合并完成各种字符串处理操作,创建任何想要的排版布局。字符串类型还支持将字符串按给定列宽进行填充,这些方法也很有用 。"
8786
8887#: ../../tutorial/inputoutput.rst:55
8988msgid ""
9089"When you don't need fancy output but just want a quick display of some "
9190"variables for debugging purposes, you can convert any value to a string with"
9291" the :func:`repr` or :func:`str` functions."
93- msgstr ""
94- "当你不需要花哨的输出而只是想快速显示某些变量以进行调试时,可以使用 :func:`repr` or :func:`str` 函数将任何值转化为字符串。"
92+ msgstr "如果不需要花哨的输出,只想快速显示变量以进行调试,可以用 :func:`repr` 或 :func:`str` 函数把值转化为字符串。"
9593
9694#: ../../tutorial/inputoutput.rst:59
9795msgid ""
0 commit comments