@@ -1069,7 +1069,7 @@ msgid ""
10691069"Match this path against the provided glob-style pattern. Return ``True`` if "
10701070"matching is successful, ``False`` otherwise. For example::"
10711071msgstr ""
1072- "將路徑與 glob 形式的樣式 (glob-style pattern) 做比對。如果比對成功則回傳 "
1072+ "將路徑與 glob 形式的模式 (glob-style pattern) 做比對。如果比對成功則回傳 "
10731073"``True``,否則回傳 ``False``,例如: ::"
10741074
10751075#: ../../library/pathlib.rst:571
@@ -1122,7 +1122,7 @@ msgid ""
11221122"Match this path against the provided non-recursive glob-style pattern. "
11231123"Return ``True`` if matching is successful, ``False`` otherwise."
11241124msgstr ""
1125- "將路徑與非遞迴 glob 形式的樣式 (glob-style pattern) 做比對。如果比對成功則回"
1125+ "將路徑與非遞迴 glob 形式的模式 (glob-style pattern) 做比對。如果比對成功則回"
11261126"傳 ``True``,否則回傳 ``False``。"
11271127
11281128#: ../../library/pathlib.rst:600
@@ -1132,9 +1132,9 @@ msgid ""
11321132"\" ``**``\" isn't supported (it acts like non-recursive \" ``*``\" ), and if a "
11331133"relative pattern is provided, then matching is done from the right::"
11341134msgstr ""
1135- "此方法類似於 :meth:`~PurePath.full_match`,但不允許空白樣式 (會引發 :exc:"
1135+ "此方法類似於 :meth:`~PurePath.full_match`,但不允許空白模式 (會引發 :exc:"
11361136"`ValueError`)、不支援遞迴萬用字元 \" ``**``\" (它會像非遞迴的 \" ``*``\" 一"
1137- "樣),且如果提供相對樣式 ,則會從右邊進行比對: ::"
1137+ "樣),且如果提供相對模式 ,則會從右邊進行比對: ::"
11381138
11391139#: ../../library/pathlib.rst:605
11401140msgid ""
@@ -2803,15 +2803,15 @@ msgstr ""
28032803
28042804#: ../../library/pathlib.rst:1650
28052805msgid "Pattern language"
2806- msgstr "樣式語言 (pattern language)"
2806+ msgstr "模式語言 (pattern language)"
28072807
28082808#: ../../library/pathlib.rst:1652
28092809msgid ""
28102810"The following wildcards are supported in patterns for :meth:`~PurePath."
28112811"full_match`, :meth:`~Path.glob` and :meth:`~Path.rglob`:"
28122812msgstr ""
28132813"以下的萬用字元在 :meth:`~PurePath.full_match`、:meth:`~Path.glob` 和 :meth:"
2814- "`~Path.rglob` 的樣式中被支援 :"
2814+ "`~Path.rglob` 的模式中被支援 :"
28152815
28162816#: ../../library/pathlib.rst:1655
28172817msgid "``**`` (entire segment)"
@@ -2875,7 +2875,7 @@ msgstr "\"``**``\" 萬用字元讓它可以做遞迴 glob。例如:"
28752875
28762876#: ../../library/pathlib.rst:1674
28772877msgid "Pattern"
2878- msgstr "樣式 "
2878+ msgstr "模式 "
28792879
28802880#: ../../library/pathlib.rst:1674
28812881msgid "Meaning"
@@ -2927,15 +2927,15 @@ msgid ""
29272927"Globbing with a pattern that ends with \" ``**``\" returns both files and "
29282928"directories. In previous versions, only directories were returned."
29292929msgstr ""
2930- "Glob 使用結尾為 ``**`` 的樣式會同時回傳檔案和目錄 。在先前版本中,只會回傳目"
2930+ "Glob 使用結尾為 ``**`` 的模式會同時回傳檔案和目錄 。在先前版本中,只會回傳目"
29312931"錄。"
29322932
29332933#: ../../library/pathlib.rst:1690
29342934msgid ""
29352935"In :meth:`Path.glob` and :meth:`~Path.rglob`, a trailing slash may be added "
29362936"to the pattern to match only directories."
29372937msgstr ""
2938- "在 :meth:`Path.glob` 和 :meth:`~Path.rglob` 中,可以在樣式後面加上斜線以只匹 "
2938+ "在 :meth:`Path.glob` 和 :meth:`~Path.rglob` 中,可以在模式後面加上斜線以只匹 "
29392939"配目錄。"
29402940
29412941#: ../../library/pathlib.rst:1693
@@ -2944,7 +2944,7 @@ msgid ""
29442944"data:`~os.sep` or :data:`~os.altsep`) returns only directories."
29452945msgstr ""
29462946"Glob 使用以路徑名稱組成的分隔符號(:data:`~os.sep` 或 :data:`~os.altsep`)作"
2947- "結尾的樣式則只會回傳目錄 。"
2947+ "結尾的模式則只會回傳目錄 。"
29482948
29492949#: ../../library/pathlib.rst:1699
29502950msgid "Comparison to the :mod:`glob` module"
@@ -2955,7 +2955,7 @@ msgid ""
29552955"The patterns accepted and results generated by :meth:`Path.glob` and :meth:"
29562956"`Path.rglob` differ slightly from those by the :mod:`glob` module:"
29572957msgstr ""
2958- ":meth:`Path.glob` 和 :meth:`Path.rglob` 接受的樣式和產生的結果與 :mod:`glob` "
2958+ ":meth:`Path.glob` 和 :meth:`Path.rglob` 接受的模式和產生的結果與 :mod:`glob` "
29592959"模組略有不同:"
29602960
29612961#: ../../library/pathlib.rst:1704
@@ -2971,7 +2971,7 @@ msgid ""
29712971"\" ``**``\" pattern components are always recursive in pathlib. This is like "
29722972"passing ``recursive=True`` to :func:`glob.glob`."
29732973msgstr ""
2974- "``**`` 樣式組成在 pathlib 中總是遞迴的。這與將 ``recursive=True`` 傳遞給 :"
2974+ "``**`` 模式組成在 pathlib 中總是遞迴的。這與將 ``recursive=True`` 傳遞給 :"
29752975"func:`glob.glob` 相同。"
29762976
29772977#: ../../library/pathlib.rst:1708
@@ -2980,7 +2980,7 @@ msgid ""
29802980"This behaviour has no equivalent in :func:`glob.glob`, but you can pass "
29812981"``recurse_symlinks=True`` to :meth:`Path.glob` for compatible behaviour."
29822982msgstr ""
2983- "在 pathlib 中,``**`` 樣式組成預設不跟隨符號連結 。這在 :func:`glob.glob` 中沒"
2983+ "在 pathlib 中,``**`` 模式組成預設不跟隨符號連結 。這在 :func:`glob.glob` 中沒"
29842984"有等效的行為,但你可以將 ``recurse_symlinks=True`` 傳遞給 :meth:`Path.glob` "
29852985"以獲得相容的行為。"
29862986
@@ -3416,99 +3416,3 @@ msgstr "path(路徑)"
34163416#: ../../library/pathlib.rst:11
34173417msgid "operations"
34183418msgstr "operations(操作)"
3419-
3420- #~ msgid ""
3421- #~ "File system calls on reserved paths can fail mysteriously or have "
3422- #~ "unintended effects."
3423- #~ msgstr "在保留路徑上的檔案系統呼叫會神秘地失敗或有意外的效果。"
3424-
3425- #~ msgid ""
3426- #~ "If *pattern* is relative, the path can be either relative or absolute, "
3427- #~ "and matching is done from the right::"
3428- #~ msgstr ""
3429- #~ "如果 *pattern* 是相對的,則路徑可以是相對或絕對的,而且會從右邊來完成比"
3430- #~ "對: ::"
3431-
3432- #~ msgid ""
3433- #~ "If *pattern* is absolute, the path must be absolute, and the whole path "
3434- #~ "must match::"
3435- #~ msgstr ""
3436- #~ "如果 *pattern* 是絕對的,則路徑必須是絕對的,且整個路徑都要比對到: ::"
3437-
3438- #~ msgid ""
3439- #~ ">>> PurePath('/a.py').match('/*.py')\n"
3440- #~ "True\n"
3441- #~ ">>> PurePath('a/b.py').match('/*.py')\n"
3442- #~ "False"
3443- #~ msgstr ""
3444- #~ ">>> PurePath('/a.py').match('/*.py')\n"
3445- #~ "True\n"
3446- #~ ">>> PurePath('a/b.py').match('/*.py')\n"
3447- #~ "False"
3448-
3449- #~ msgid ""
3450- #~ "The *pattern* may be another path object; this speeds up matching the "
3451- #~ "same pattern against multiple files::"
3452- #~ msgstr ""
3453- #~ "*pattern* 可以是另一個路徑物件;這會加速對多個檔案比對相同的樣式: ::"
3454-
3455- #~ msgid ""
3456- #~ ">>> pattern = PurePath('*.py')\n"
3457- #~ ">>> PurePath('a/b.py').match(pattern)\n"
3458- #~ "True"
3459- #~ msgstr ""
3460- #~ ">>> pattern = PurePath('*.py')\n"
3461- #~ ">>> PurePath('a/b.py').match(pattern)\n"
3462- #~ "True"
3463-
3464- #~ msgid "Accepts an object implementing the :class:`os.PathLike` interface."
3465- #~ msgstr "接受一個有實作 :class:`os.PathLike` 介面的物件。"
3466-
3467- #~ msgid ""
3468- #~ ">>> sorted(Path('.').glob('*.py'))\n"
3469- #~ "[PosixPath('pathlib.py'), PosixPath('setup.py'), PosixPath('test_pathlib."
3470- #~ "py')]\n"
3471- #~ ">>> sorted(Path('.').glob('*/*.py'))\n"
3472- #~ "[PosixPath('docs/conf.py')]"
3473- #~ msgstr ""
3474- #~ ">>> sorted(Path('.').glob('*.py'))\n"
3475- #~ "[PosixPath('pathlib.py'), PosixPath('setup.py'), PosixPath('test_pathlib."
3476- #~ "py')]\n"
3477- #~ ">>> sorted(Path('.').glob('*/*.py'))\n"
3478- #~ "[PosixPath('docs/conf.py')]"
3479-
3480- #~ msgid ""
3481- #~ "Patterns are the same as for :mod:`fnmatch`, with the addition of "
3482- #~ "\"``**``\" which means \"this directory and all subdirectories, "
3483- #~ "recursively\". In other words, it enables recursive globbing::"
3484- #~ msgstr ""
3485- #~ "模式 (pattern) 和給 :mod:`fnmatch` 的一樣,加上 \"``**``\" 代表「目前目錄"
3486- #~ "及所有遞迴的子目錄」。也就是說它能夠做遞迴的 glob 比對: ::"
3487-
3488- #~ msgid ""
3489- #~ "This method calls :meth:`Path.is_dir` on the top-level directory and "
3490- #~ "propagates any :exc:`OSError` exception that is raised. Subsequent :exc:"
3491- #~ "`OSError` exceptions from scanning directories are suppressed."
3492- #~ msgstr ""
3493- #~ "此方法在頂層目錄上呼叫 :meth:`Path.is_dir` 並傳遞引發的任何 :exc:"
3494- #~ "`OSError` 例外。將會抑制在目錄對於 :exc:`OSError` 例外的後續掃描。"
3495-
3496- #~ msgid ""
3497- #~ "Using the \"``**``\" pattern in large directory trees may consume an "
3498- #~ "inordinate amount of time."
3499- #~ msgstr "在很大的目錄樹裡使用 \"``**``\" 可能會耗費過多的時間。"
3500-
3501- #~ msgid ""
3502- #~ ">>> sorted(Path().rglob(\"*.py\"))\n"
3503- #~ "[PosixPath('build/lib/pathlib.py'),\n"
3504- #~ " PosixPath('docs/conf.py'),\n"
3505- #~ " PosixPath('pathlib.py'),\n"
3506- #~ " PosixPath('setup.py'),\n"
3507- #~ " PosixPath('test_pathlib.py')]"
3508- #~ msgstr ""
3509- #~ ">>> sorted(Path().rglob(\"*.py\"))\n"
3510- #~ "[PosixPath('build/lib/pathlib.py'),\n"
3511- #~ " PosixPath('docs/conf.py'),\n"
3512- #~ " PosixPath('pathlib.py'),\n"
3513- #~ " PosixPath('setup.py'),\n"
3514- #~ " PosixPath('test_pathlib.py')]"
0 commit comments