@@ -1069,7 +1069,7 @@ msgid ""
1069
1069
"Match this path against the provided glob-style pattern. Return ``True`` if "
1070
1070
"matching is successful, ``False`` otherwise. For example::"
1071
1071
msgstr ""
1072
- "將路徑與 glob 形式的樣式 (glob-style pattern) 做比對。如果比對成功則回傳 "
1072
+ "將路徑與 glob 形式的模式 (glob-style pattern) 做比對。如果比對成功則回傳 "
1073
1073
"``True``,否則回傳 ``False``,例如: ::"
1074
1074
1075
1075
#: ../../library/pathlib.rst:571
@@ -1122,7 +1122,7 @@ msgid ""
1122
1122
"Match this path against the provided non-recursive glob-style pattern. "
1123
1123
"Return ``True`` if matching is successful, ``False`` otherwise."
1124
1124
msgstr ""
1125
- "將路徑與非遞迴 glob 形式的樣式 (glob-style pattern) 做比對。如果比對成功則回"
1125
+ "將路徑與非遞迴 glob 形式的模式 (glob-style pattern) 做比對。如果比對成功則回"
1126
1126
"傳 ``True``,否則回傳 ``False``。"
1127
1127
1128
1128
#: ../../library/pathlib.rst:600
@@ -1132,9 +1132,9 @@ msgid ""
1132
1132
"\" ``**``\" isn't supported (it acts like non-recursive \" ``*``\" ), and if a "
1133
1133
"relative pattern is provided, then matching is done from the right::"
1134
1134
msgstr ""
1135
- "此方法類似於 :meth:`~PurePath.full_match`,但不允許空白樣式 (會引發 :exc:"
1135
+ "此方法類似於 :meth:`~PurePath.full_match`,但不允許空白模式 (會引發 :exc:"
1136
1136
"`ValueError`)、不支援遞迴萬用字元 \" ``**``\" (它會像非遞迴的 \" ``*``\" 一"
1137
- "樣),且如果提供相對樣式 ,則會從右邊進行比對: ::"
1137
+ "樣),且如果提供相對模式 ,則會從右邊進行比對: ::"
1138
1138
1139
1139
#: ../../library/pathlib.rst:605
1140
1140
msgid ""
@@ -2803,15 +2803,15 @@ msgstr ""
2803
2803
2804
2804
#: ../../library/pathlib.rst:1650
2805
2805
msgid "Pattern language"
2806
- msgstr "樣式語言 (pattern language)"
2806
+ msgstr "模式語言 (pattern language)"
2807
2807
2808
2808
#: ../../library/pathlib.rst:1652
2809
2809
msgid ""
2810
2810
"The following wildcards are supported in patterns for :meth:`~PurePath."
2811
2811
"full_match`, :meth:`~Path.glob` and :meth:`~Path.rglob`:"
2812
2812
msgstr ""
2813
2813
"以下的萬用字元在 :meth:`~PurePath.full_match`、:meth:`~Path.glob` 和 :meth:"
2814
- "`~Path.rglob` 的樣式中被支援 :"
2814
+ "`~Path.rglob` 的模式中被支援 :"
2815
2815
2816
2816
#: ../../library/pathlib.rst:1655
2817
2817
msgid "``**`` (entire segment)"
@@ -2875,7 +2875,7 @@ msgstr "\"``**``\" 萬用字元讓它可以做遞迴 glob。例如:"
2875
2875
2876
2876
#: ../../library/pathlib.rst:1674
2877
2877
msgid "Pattern"
2878
- msgstr "樣式 "
2878
+ msgstr "模式 "
2879
2879
2880
2880
#: ../../library/pathlib.rst:1674
2881
2881
msgid "Meaning"
@@ -2927,15 +2927,15 @@ msgid ""
2927
2927
"Globbing with a pattern that ends with \" ``**``\" returns both files and "
2928
2928
"directories. In previous versions, only directories were returned."
2929
2929
msgstr ""
2930
- "Glob 使用結尾為 ``**`` 的樣式會同時回傳檔案和目錄 。在先前版本中,只會回傳目"
2930
+ "Glob 使用結尾為 ``**`` 的模式會同時回傳檔案和目錄 。在先前版本中,只會回傳目"
2931
2931
"錄。"
2932
2932
2933
2933
#: ../../library/pathlib.rst:1690
2934
2934
msgid ""
2935
2935
"In :meth:`Path.glob` and :meth:`~Path.rglob`, a trailing slash may be added "
2936
2936
"to the pattern to match only directories."
2937
2937
msgstr ""
2938
- "在 :meth:`Path.glob` 和 :meth:`~Path.rglob` 中,可以在樣式後面加上斜線以只匹 "
2938
+ "在 :meth:`Path.glob` 和 :meth:`~Path.rglob` 中,可以在模式後面加上斜線以只匹 "
2939
2939
"配目錄。"
2940
2940
2941
2941
#: ../../library/pathlib.rst:1693
@@ -2944,7 +2944,7 @@ msgid ""
2944
2944
"data:`~os.sep` or :data:`~os.altsep`) returns only directories."
2945
2945
msgstr ""
2946
2946
"Glob 使用以路徑名稱組成的分隔符號(:data:`~os.sep` 或 :data:`~os.altsep`)作"
2947
- "結尾的樣式則只會回傳目錄 。"
2947
+ "結尾的模式則只會回傳目錄 。"
2948
2948
2949
2949
#: ../../library/pathlib.rst:1699
2950
2950
msgid "Comparison to the :mod:`glob` module"
@@ -2955,7 +2955,7 @@ msgid ""
2955
2955
"The patterns accepted and results generated by :meth:`Path.glob` and :meth:"
2956
2956
"`Path.rglob` differ slightly from those by the :mod:`glob` module:"
2957
2957
msgstr ""
2958
- ":meth:`Path.glob` 和 :meth:`Path.rglob` 接受的樣式和產生的結果與 :mod:`glob` "
2958
+ ":meth:`Path.glob` 和 :meth:`Path.rglob` 接受的模式和產生的結果與 :mod:`glob` "
2959
2959
"模組略有不同:"
2960
2960
2961
2961
#: ../../library/pathlib.rst:1704
@@ -2971,7 +2971,7 @@ msgid ""
2971
2971
"\" ``**``\" pattern components are always recursive in pathlib. This is like "
2972
2972
"passing ``recursive=True`` to :func:`glob.glob`."
2973
2973
msgstr ""
2974
- "``**`` 樣式組成在 pathlib 中總是遞迴的。這與將 ``recursive=True`` 傳遞給 :"
2974
+ "``**`` 模式組成在 pathlib 中總是遞迴的。這與將 ``recursive=True`` 傳遞給 :"
2975
2975
"func:`glob.glob` 相同。"
2976
2976
2977
2977
#: ../../library/pathlib.rst:1708
@@ -2980,7 +2980,7 @@ msgid ""
2980
2980
"This behaviour has no equivalent in :func:`glob.glob`, but you can pass "
2981
2981
"``recurse_symlinks=True`` to :meth:`Path.glob` for compatible behaviour."
2982
2982
msgstr ""
2983
- "在 pathlib 中,``**`` 樣式組成預設不跟隨符號連結 。這在 :func:`glob.glob` 中沒"
2983
+ "在 pathlib 中,``**`` 模式組成預設不跟隨符號連結 。這在 :func:`glob.glob` 中沒"
2984
2984
"有等效的行為,但你可以將 ``recurse_symlinks=True`` 傳遞給 :meth:`Path.glob` "
2985
2985
"以獲得相容的行為。"
2986
2986
@@ -3416,99 +3416,3 @@ msgstr "path(路徑)"
3416
3416
#: ../../library/pathlib.rst:11
3417
3417
msgid "operations"
3418
3418
msgstr "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