@@ -775,8 +775,9 @@ msgid ""
775775"objects>` instance is returned, containing information about the match: "
776776"where it starts and ends, the substring it matched, and more."
777777msgstr ""
778- "如果没有找到匹配, :meth:`~re.Pattern.match` 和 :meth:`~re.Pattern.search` 返回 ``None``"
779- " 。如果它们成功, 一个 :ref:`匹配对象 <match-objects>` 实例将被返回,包含匹配相关的信息:起始和终结位置、匹配的子串以及其它。"
778+ "如果 :meth:`~re.Pattern.match` 和 :meth:`~re.Pattern.search` 方法没有找到匹配项,它们会返回 "
779+ "``None`` 。如果成功找到匹配项,则返回一个匹配对象( :ref:`match object <match-objects>` "
780+ ")实例。这个对象实例包含了关于匹配结果的详细信息,比如匹配项的起始和结束位置、匹配到的子字符串等等。"
780781
781782#: ../../howto/regex.rst:383
782783msgid ""
@@ -789,7 +790,7 @@ msgid ""
789790"This HOWTO uses the standard Python interpreter for its examples. First, run"
790791" the Python interpreter, import the :mod:`re` module, and compile a RE::"
791792msgstr ""
792- "本 HOWTO 使用标准 Python 解释器作为示例 。 首先,运行 Python 解释器,导入 :mod:`re` 模块,然后编译一个正则 ::"
793+ "本教程使用标准 Python 解释器来演示例子 。 首先,运行 Python 解释器,导入 :mod:`re` 模块,然后编译一个正则表达式 ::"
793794
794795#: ../../howto/regex.rst:394
795796msgid ""
@@ -799,9 +800,9 @@ msgid ""
799800" which will cause the interpreter to print no output. You can explicitly "
800801"print the result of :meth:`!match` to make this clear. ::"
801802msgstr ""
802- "现在,你可以尝试匹配正则 ``[a-z]+`` 的各种字符串。 空字符串根本不匹配 ,因为 ``+`` 表示“一次或多次重复”。 "
803- ":meth:`~re.Pattern.match` 在这种情况下应返回 ``None``,这将导致解释器不打印输出。 你可以显式打印 "
804- ":meth:`!match` 的结果,使其清晰 。::"
803+ "现在,你可以尝试用正则 ``[a-z]+`` 去匹配不同的字符串。 空字符是无法匹配的 ,因为 ``+`` 表示“一次或多次重复”。 "
804+ "在这种情况下, :meth:`~re.Pattern.match` 会返回 ``None``,导致解释器没有任何输出。 "
805+ "为了更直观地了解这一点,你可以显式打印 :meth:`!match` 的返回结果 。::"
805806
806807#: ../../howto/regex.rst:404
807808msgid ""
0 commit comments