Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit530a491

Browse files
sync with cpython 0076ca48
1 parent5ffa35b commit530a491

File tree

2 files changed

+113
-96
lines changed

2 files changed

+113
-96
lines changed

‎library/re.po‎

Lines changed: 62 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version:Python 3.11\n"
99
"Report-Msgid-Bugs-To:\n"
10-
"POT-Creation-Date:2022-11-04 00:20+0000\n"
10+
"POT-Creation-Date:2022-12-01 00:20+0000\n"
1111
"PO-Revision-Date:2018-05-23 16:09+0000\n"
1212
"Last-Translator:Adrian Liaw <adrianliaw2000@gmail.com>\n"
1313
"Language-Team:Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -175,8 +175,8 @@ msgstr "``$``"
175175
msgid""
176176
"Matches the end of the string or just before the newline at the end of the "
177177
"string, and in :const:`MULTILINE` mode also matches before a newline. "
178-
"``foo`` matches both 'foo' and 'foobar', while the regular expression``foo"
179-
"$`` matches only 'foo'. More interestingly, searching for ``foo.$`` in "
178+
"``foo`` matches both 'foo' and 'foobar', while the regular expression "
179+
"``foo$`` matches only 'foo'. More interestingly, searching for ``foo.$`` in "
180180
"``'foo1\\nfoo2\\n'`` matches 'foo2' normally, but 'foo1' in :const:"
181181
"`MULTILINE` mode; searching for a single ``$`` in ``'foo\\n'`` will find two "
182182
"(empty) matches: one just before the newline, and one at the end of the "
@@ -806,10 +806,10 @@ msgstr "``\\s``"
806806

807807
#:../../library/re.rst:571
808808
msgid""
809-
"Matches Unicode whitespace characters (which includes``[\\t\\n\\r\\f"
810-
"\\v]``, and also many other characters, for example the non-breaking spaces"
811-
"mandated by typography rules in many languages). If the :const:`ASCII` flag"
812-
"is used, only ``[\\t\\n\\r\\f\\v]`` is matched."
809+
"Matches Unicode whitespace characters (which includes "
810+
"``[\\t\\n\\r\\f\\v]``, and also many other characters, for example the non-"
811+
"breaking spacesmandated by typography rules in many languages). If the :"
812+
"const:`ASCII` flagis used, only ``[\\t\\n\\r\\f\\v]`` is matched."
813813
msgstr""
814814

815815
#:../../library/re.rst:578
@@ -943,9 +943,9 @@ msgstr ""
943943

944944
#:../../library/re.rst:689
945945
msgid""
946-
"Make ``\\w``, ``\\W``, ``\\b``, ``\\B``, ``\\d``, ``\\D``, ``\\s`` and``"
947-
"\\S`` perform ASCII-only matching instead of full Unicode matching. This is "
948-
"only meaningful for Unicode patterns, and is ignored for byte patterns. "
946+
"Make ``\\w``, ``\\W``, ``\\b``, ``\\B``, ``\\d``, ``\\D``, ``\\s`` and "
947+
"``\\S`` perform ASCII-only matching instead of full Unicode matching. This "
948+
"isonly meaningful for Unicode patterns, and is ignored for byte patterns. "
949949
"Corresponds to the inline flag ``(?a)``."
950950
msgstr""
951951

@@ -978,9 +978,9 @@ msgid ""
978978
"Note that when the Unicode patterns ``[a-z]`` or ``[A-Z]`` are used in "
979979
"combination with the :const:`IGNORECASE` flag, they will match the 52 ASCII "
980980
"letters and 4 additional non-ASCII letters: 'İ' (U+0130, Latin capital "
981-
"letter I with dot above), 'ı' (U+0131, Latin small letter dotless i),'ſ' (U"
982-
"+017F, Latin small letter long s) and 'K' (U+212A, Kelvin sign). Ifthe :"
983-
"const:`ASCII` flag is used, only letters 'a' to 'z' and 'A' to 'Z' are "
981+
"letter I with dot above), 'ı' (U+0131, Latin small letter dotless i), "
982+
"'ſ' (U+017F, Latin small letter long s) and 'K' (U+212A, Kelvin sign). If "
983+
"the :const:`ASCII` flag is used, only letters 'a' to 'z' and 'A' to 'Z' are "
984984
"matched."
985985
msgstr""
986986

@@ -1210,11 +1210,11 @@ msgid ""
12101210
"occurrences of *pattern* in *string* by the replacement *repl*. If the "
12111211
"pattern isn't found, *string* is returned unchanged. *repl* can be a string "
12121212
"or a function; if it is a string, any backslash escapes in it are "
1213-
"processed. That is, ``\\n`` is converted to a single newline character,``"
1214-
"\\r`` is converted to a carriage return, and so forth. Unknown escapes of "
1213+
"processed. That is, ``\\n`` is converted to a single newline character, "
1214+
"``\\r`` is converted to a carriage return, and so forth. Unknown escapes of "
12151215
"ASCII letters are reserved for future use and treated as errors. Other "
1216-
"unknown escapes such as ``\\&`` are left alone. Backreferences, such as``"
1217-
"\\6``, are replaced with the substring matched by group 6 in the pattern. "
1216+
"unknown escapes such as ``\\&`` are left alone. Backreferences, such as "
1217+
"``\\6``, are replaced with the substring matched by group 6 in the pattern. "
12181218
"For example::"
12191219
msgstr""
12201220

@@ -1242,11 +1242,11 @@ msgstr ""
12421242
msgid""
12431243
"In string-type *repl* arguments, in addition to the character escapes and "
12441244
"backreferences described above, ``\\g<name>`` will use the substring matched "
1245-
"by the group named ``name``, as defined by the ``(?P<name>...)`` syntax.``"
1246-
"\\g<number>`` uses the corresponding group number; ``\\g<2>`` is therefore "
1247-
"equivalent to ``\\2``, but isn't ambiguous in a replacement such as``"
1248-
"\\g<2>0``. ``\\20`` would be interpreted as a reference to group 20, not a "
1249-
"reference to group 2 followed by the literal character ``'0'``. The "
1245+
"by the group named ``name``, as defined by the ``(?P<name>...)`` syntax. "
1246+
"``\\g<number>`` uses the corresponding group number; ``\\g<2>`` is therefore "
1247+
"equivalent to ``\\2``, but isn't ambiguous in a replacement such as "
1248+
"``\\g<2>0``. ``\\20`` would be interpreted as a reference to group 20, not "
1249+
"areference to group 2 followed by the literal character ``'0'``. The "
12501250
"backreference ``\\g<0>`` substitutes in the entire substring matched by the "
12511251
"RE."
12521252
msgstr""
@@ -1492,8 +1492,8 @@ msgid ""
14921492
"Return the string obtained by doing backslash substitution on the template "
14931493
"string *template*, as done by the :meth:`~Pattern.sub` method. Escapes such "
14941494
"as ``\\n`` are converted to the appropriate characters, and numeric "
1495-
"backreferences (``\\1``, ``\\2``) and named backreferences (``\\g<1>``,``"
1496-
"\\g<name>``) are replaced by the contents of the corresponding group."
1495+
"backreferences (``\\1``, ``\\2``) and named backreferences (``\\g<1>``, "
1496+
"``\\g<name>``) are replaced by the contents of the corresponding group."
14971497
msgstr""
14981498

14991499
#:../../library/re.rst:1269
@@ -1548,7 +1548,7 @@ msgid ""
15481548
"groups that did not participate in the match; it defaults to ``None``."
15491549
msgstr""
15501550

1551-
#:../../library/re.rst:1348../../library/re.rst:1570
1551+
#:../../library/re.rst:1348../../library/re.rst:1573
15521552
msgid"For example::"
15531553
msgstr""
15541554
"舉例來說:\n"
@@ -1788,93 +1788,104 @@ msgstr ""
17881788

17891789
#:../../library/re.rst:1565
17901790
msgid""
1791-
"Python offers two different primitive operations based on regular "
1792-
"expressions: :func:`re.match` checks for a match only at the beginning of "
1793-
"the string, while :func:`re.search` checks for a match anywhere in the "
1794-
"string (this is what Perl does by default)."
1791+
"Python offers different primitive operations based on regular expressions:"
17951792
msgstr""
17961793

1797-
#:../../library/re.rst:1576
1794+
#:../../library/re.rst:1567
1795+
msgid":func:`re.match` checks for a match only at the beginning of the string"
1796+
msgstr""
1797+
1798+
#:../../library/re.rst:1568
1799+
msgid""
1800+
":func:`re.search` checks for a match anywhere in the string (this is what "
1801+
"Perl does by default)"
1802+
msgstr""
1803+
1804+
#:../../library/re.rst:1570
1805+
msgid":func:`re.fullmatch` checks for entire string to be a match"
1806+
msgstr""
1807+
1808+
#:../../library/re.rst:1582
17981809
msgid""
17991810
"Regular expressions beginning with ``'^'`` can be used with :func:`search` "
18001811
"to restrict the match at the beginning of the string::"
18011812
msgstr""
18021813

1803-
#:../../library/re.rst:1584
1814+
#:../../library/re.rst:1590
18041815
msgid""
18051816
"Note however that in :const:`MULTILINE` mode :func:`match` only matches at "
18061817
"the beginning of the string, whereas using :func:`search` with a regular "
18071818
"expression beginning with ``'^'`` will match at the beginning of each "
18081819
"line. ::"
18091820
msgstr""
18101821

1811-
#:../../library/re.rst:1594
1822+
#:../../library/re.rst:1600
18121823
msgid"Making a Phonebook"
18131824
msgstr""
18141825

1815-
#:../../library/re.rst:1596
1826+
#:../../library/re.rst:1602
18161827
msgid""
18171828
":func:`split` splits a string into a list delimited by the passed pattern. "
18181829
"The method is invaluable for converting textual data into data structures "
18191830
"that can be easily read and modified by Python as demonstrated in the "
18201831
"following example that creates a phonebook."
18211832
msgstr""
18221833

1823-
#:../../library/re.rst:1601
1834+
#:../../library/re.rst:1607
18241835
msgid""
18251836
"First, here is the input. Normally it may come from a file, here we are "
18261837
"using triple-quoted string syntax"
18271838
msgstr""
18281839

1829-
#:../../library/re.rst:1614
1840+
#:../../library/re.rst:1620
18301841
msgid""
18311842
"The entries are separated by one or more newlines. Now we convert the string "
18321843
"into a list with each nonempty line having its own entry:"
18331844
msgstr""
18341845

1835-
#:../../library/re.rst:1627
1846+
#:../../library/re.rst:1633
18361847
msgid""
18371848
"Finally, split each entry into a list with first name, last name, telephone "
18381849
"number, and address. We use the ``maxsplit`` parameter of :func:`split` "
18391850
"because the address has spaces, our splitting pattern, in it:"
18401851
msgstr""
18411852

1842-
#:../../library/re.rst:1640
1853+
#:../../library/re.rst:1646
18431854
msgid""
18441855
"The ``:?`` pattern matches the colon after the last name, so that it does "
18451856
"not occur in the result list. With a ``maxsplit`` of ``4``, we could "
18461857
"separate the house number from the street name:"
18471858
msgstr""
18481859

1849-
#:../../library/re.rst:1655
1860+
#:../../library/re.rst:1661
18501861
msgid"Text Munging"
18511862
msgstr""
18521863

1853-
#:../../library/re.rst:1657
1864+
#:../../library/re.rst:1663
18541865
msgid""
18551866
":func:`sub` replaces every occurrence of a pattern with a string or the "
18561867
"result of a function. This example demonstrates using :func:`sub` with a "
18571868
"function to\"munge\" text, or randomize the order of all the characters in "
18581869
"each word of a sentence except for the first and last characters::"
18591870
msgstr""
18601871

1861-
#:../../library/re.rst:1674
1872+
#:../../library/re.rst:1680
18621873
msgid"Finding all Adverbs"
18631874
msgstr""
18641875

1865-
#:../../library/re.rst:1676
1876+
#:../../library/re.rst:1682
18661877
msgid""
18671878
":func:`findall` matches *all* occurrences of a pattern, not just the first "
18681879
"one as :func:`search` does. For example, if a writer wanted to find all of "
18691880
"the adverbs in some text, they might use :func:`findall` in the following "
18701881
"manner::"
18711882
msgstr""
18721883

1873-
#:../../library/re.rst:1687
1884+
#:../../library/re.rst:1693
18741885
msgid"Finding all Adverbs and their Positions"
18751886
msgstr""
18761887

1877-
#:../../library/re.rst:1689
1888+
#:../../library/re.rst:1695
18781889
msgid""
18791890
"If one wants more information about all matches of a pattern than the "
18801891
"matched text, :func:`finditer` is useful as it provides :ref:`match objects "
@@ -1883,49 +1894,49 @@ msgid ""
18831894
"text, they would use :func:`finditer` in the following manner::"
18841895
msgstr""
18851896

1886-
#:../../library/re.rst:1703
1897+
#:../../library/re.rst:1709
18871898
msgid"Raw String Notation"
18881899
msgstr""
18891900

1890-
#:../../library/re.rst:1705
1901+
#:../../library/re.rst:1711
18911902
msgid""
18921903
"Raw string notation (``r\"text\"``) keeps regular expressions sane. Without "
18931904
"it, every backslash (``'\\'``) in a regular expression would have to be "
18941905
"prefixed with another one to escape it. For example, the two following "
18951906
"lines of code are functionally identical::"
18961907
msgstr""
18971908

1898-
#:../../library/re.rst:1715
1909+
#:../../library/re.rst:1721
18991910
msgid""
19001911
"When one wants to match a literal backslash, it must be escaped in the "
19011912
"regular expression. With raw string notation, this means ``r\"\\\\\"``. "
19021913
"Without raw string notation, one must use ``\"\\\\\\\\\"``, making the "
19031914
"following lines of code functionally identical::"
19041915
msgstr""
19051916

1906-
#:../../library/re.rst:1727
1917+
#:../../library/re.rst:1733
19071918
msgid"Writing a Tokenizer"
19081919
msgstr""
19091920

1910-
#:../../library/re.rst:1729
1921+
#:../../library/re.rst:1735
19111922
msgid""
19121923
"A `tokenizer or scanner <https://en.wikipedia.org/wiki/Lexical_analysis>`_ "
19131924
"analyzes a string to categorize groups of characters. This is a useful "
19141925
"first step in writing a compiler or interpreter."
19151926
msgstr""
19161927

1917-
#:../../library/re.rst:1733
1928+
#:../../library/re.rst:1739
19181929
msgid""
19191930
"The text categories are specified with regular expressions. The technique "
19201931
"is to combine those into a single master regular expression and to loop over "
19211932
"successive matches::"
19221933
msgstr""
19231934

1924-
#:../../library/re.rst:1789
1935+
#:../../library/re.rst:1795
19251936
msgid"The tokenizer produces the following output::"
19261937
msgstr""
19271938

1928-
#:../../library/re.rst:1812
1939+
#:../../library/re.rst:1818
19291940
msgid""
19301941
"Friedl, Jeffrey. Mastering Regular Expressions. 3rd ed., O'Reilly Media, "
19311942
"2009. The third edition of the book no longer covers Python at all, but the "

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp