@@ -11,7 +11,7 @@ msgid ""
11
11
msgstr ""
12
12
"Project-Id-Version : Python 3.10\n "
13
13
"Report-Msgid-Bugs-To : \n "
14
- "POT-Creation-Date : 2025-02-03 19:22 +0000\n "
14
+ "POT-Creation-Date : 2025-06-06 16:52 +0000\n "
15
15
"PO-Revision-Date : 2022-11-05 17:22+0000\n "
16
16
"Last-Translator : Rafael Fontenelle <rffontenelle@gmail.com>, 2025\n "
17
17
"Language-Team : Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
@@ -114,10 +114,10 @@ msgstr ""
114
114
#: ../../library/os.path.rst:255 ../../library/os.path.rst:265
115
115
#: ../../library/os.path.rst:275 ../../library/os.path.rst:294
116
116
#: ../../library/os.path.rst:325 ../../library/os.path.rst:345
117
- #: ../../library/os.path.rst:368 ../../library/os.path.rst:390
118
- #: ../../library/os.path.rst:408 ../../library/os.path.rst:421
119
- #: ../../library/os.path.rst:437 ../../library/os.path.rst:453
120
- #: ../../library/os.path.rst:478 ../../library/os.path.rst:509
117
+ #: ../../library/os.path.rst:384 ../../library/os.path.rst:415
118
+ #: ../../library/os.path.rst:433 ../../library/os.path.rst:446
119
+ #: ../../library/os.path.rst:462 ../../library/os.path.rst:478
120
+ #: ../../library/os.path.rst:503 ../../library/os.path.rst:534
121
121
msgid "Accepts a :term:`path-like object`."
122
122
msgstr "接受一个 :term:`path-like object`。"
123
123
@@ -145,9 +145,9 @@ msgstr ""
145
145
"在不同的驱动器上,或 *paths* 为空,则抛出 :exc:`ValueError` 异常。与 :func:`commonprefix` "
146
146
"不同,本方法返回有效路径。"
147
147
148
- #: ../../library/os.path.rst:89 ../../library/os.path.rst:389
149
- #: ../../library/os.path.rst:401 ../../library/os.path.rst:417
150
- #: ../../library/os.path.rst:433
148
+ #: ../../library/os.path.rst:89 ../../library/os.path.rst:414
149
+ #: ../../library/os.path.rst:426 ../../library/os.path.rst:442
150
+ #: ../../library/os.path.rst:458
151
151
msgid ":ref:`Availability <availability>`: Unix, Windows."
152
152
msgstr ":ref:`可用性 <availability>`: Unix, Windows。"
153
153
@@ -424,36 +424,71 @@ msgstr "返回指定文件的规范路径,消除路径中存在的任何符号
424
424
425
425
#: ../../library/os.path.rst:355
426
426
msgid ""
427
- "If a path doesn't exist or a symlink loop is encountered, and *strict* is "
428
- "``True``, :exc:`OSError` is raised. If *strict* is ``False``, the path is "
429
- "resolved as far as possible and any remainder is appended without checking "
430
- "whether it exists."
427
+ "By default, the path is evaluated up to the first component that does not "
428
+ "exist, is a symlink loop, or whose evaluation raises :exc:`OSError`. All "
429
+ "such components are appended unchanged to the existing part of the path."
431
430
msgstr ""
432
- "如果一个路径不存在或是遇到了符号链接循环,并且 *strict* 为 ``True``,则会引发 :exc:`OSError`。 如果 *strict*"
433
- " 为 ``False``,则会尽可能地解析路径并添加结果而不检查路径是否存在。"
434
431
435
- #: ../../library/os.path.rst:361
432
+ #: ../../library/os.path.rst:359
433
+ msgid ""
434
+ "Some errors that are handled this way include \" access denied\" , \" not a "
435
+ "directory\" , or \" bad argument to internal function\" . Thus, the resulting "
436
+ "path may be missing or inaccessible, may still contain links or loops, and "
437
+ "may traverse non-directories."
438
+ msgstr ""
439
+
440
+ #: ../../library/os.path.rst:364
441
+ msgid "This behavior can be modified by keyword arguments:"
442
+ msgstr ""
443
+
444
+ #: ../../library/os.path.rst:366
445
+ msgid ""
446
+ "If *strict* is ``True``, the first error encountered when evaluating the "
447
+ "path is re-raised. In particular, :exc:`FileNotFoundError` is raised if "
448
+ "*path* does not exist, or another :exc:`OSError` if it is otherwise "
449
+ "inaccessible."
450
+ msgstr ""
451
+
452
+ #: ../../library/os.path.rst:371
453
+ msgid ""
454
+ "If *strict* is :py:data:`os.path.ALLOW_MISSING`, errors other than "
455
+ ":exc:`FileNotFoundError` are re-raised (as with ``strict=True``). Thus, the "
456
+ "returned path will not contain any symbolic links, but the named file and "
457
+ "some of its parent directories may be missing."
458
+ msgstr ""
459
+
460
+ #: ../../library/os.path.rst:377
436
461
msgid ""
437
462
"This function emulates the operating system's procedure for making a path "
438
463
"canonical, which differs slightly between Windows and UNIX with respect to "
439
464
"how links and subsequent path components interact."
440
465
msgstr "这个函数会模拟操作系统生成规范路径的过程,Windows 与 UNIX 的这个过程在处理链接和后续路径组成部分的交互方式上有所差异。"
441
466
442
- #: ../../library/os.path.rst:365
467
+ #: ../../library/os.path.rst:381
443
468
msgid ""
444
469
"Operating system APIs make paths canonical as needed, so it's not normally "
445
470
"necessary to call this function."
446
471
msgstr "操作系统 API 会根据需要来规范化路径,因此通常不需要调用此函数。"
447
472
448
- #: ../../library/os.path.rst:371
473
+ #: ../../library/os.path.rst:387
449
474
msgid "Symbolic links and junctions are now resolved on Windows."
450
475
msgstr "在 Windows 上现在可以正确解析符号链接和交接点 (junction point)。"
451
476
452
- #: ../../library/os.path.rst:374
477
+ #: ../../library/os.path.rst:390
453
478
msgid "The *strict* parameter was added."
454
479
msgstr "增加了 *strict* 形参。"
455
480
456
- #: ../../library/os.path.rst:380
481
+ #: ../../library/os.path.rst:393
482
+ msgid ""
483
+ "The :py:data:`~os.path.ALLOW_MISSING` value for the *strict* parameter was "
484
+ "added."
485
+ msgstr ""
486
+
487
+ #: ../../library/os.path.rst:399
488
+ msgid "Special value used for the *strict* argument in :func:`realpath`."
489
+ msgstr ""
490
+
491
+ #: ../../library/os.path.rst:405
457
492
msgid ""
458
493
"Return a relative filepath to *path* either from the current directory or "
459
494
"from an optional *start* directory. This is a path computation: the "
@@ -465,11 +500,11 @@ msgstr ""
465
500
"*start* 是否存在或其性质。 在 Windows 上,当 *path* 和 *start* 位于不同驱动器时将引发 "
466
501
":exc:`ValueError`。"
467
502
468
- #: ../../library/os.path.rst:386
503
+ #: ../../library/os.path.rst:411
469
504
msgid "*start* defaults to :attr:`os.curdir`."
470
505
msgstr "*start* 默认为 :attr:`os.curdir`。"
471
506
472
- #: ../../library/os.path.rst:396
507
+ #: ../../library/os.path.rst:421
473
508
msgid ""
474
509
"Return ``True`` if both pathname arguments refer to the same file or "
475
510
"directory. This is determined by the device number and i-node number and "
@@ -478,22 +513,22 @@ msgstr ""
478
513
"如果两个路径都指向相同的文件或目录,则返回 ``True``。这由设备号和 inode 号确定,在任一路径上调用 :func:`os.stat` "
479
514
"失败则抛出异常。"
480
515
481
- #: ../../library/os.path.rst:402 ../../library/os.path.rst:418
482
- #: ../../library/os.path.rst:434
516
+ #: ../../library/os.path.rst:427 ../../library/os.path.rst:443
517
+ #: ../../library/os.path.rst:459
483
518
msgid "Added Windows support."
484
519
msgstr "添加了对 Windows 的支持。"
485
520
486
- #: ../../library/os.path.rst:405
521
+ #: ../../library/os.path.rst:430
487
522
msgid "Windows now uses the same implementation as all other platforms."
488
523
msgstr "Windows现在使用与其他所有平台相同的实现。"
489
524
490
- #: ../../library/os.path.rst:414
525
+ #: ../../library/os.path.rst:439
491
526
msgid ""
492
527
"Return ``True`` if the file descriptors *fp1* and *fp2* refer to the same "
493
528
"file."
494
529
msgstr "如果文件描述符 *fp1* 和 *fp2* 指向相同文件,则返回 ``True``。"
495
530
496
- #: ../../library/os.path.rst:427
531
+ #: ../../library/os.path.rst:452
497
532
msgid ""
498
533
"Return ``True`` if the stat tuples *stat1* and *stat2* refer to the same "
499
534
"file. These structures may have been returned by :func:`os.fstat`, "
@@ -504,7 +539,7 @@ msgstr ""
504
539
":func:`os.fstat`、:func:`os.lstat` 或 :func:`os.stat` 返回的。本函数实现了 "
505
540
":func:`samefile` 和 :func:`sameopenfile` 底层所使用的比较过程。"
506
541
507
- #: ../../library/os.path.rst:443
542
+ #: ../../library/os.path.rst:468
508
543
msgid ""
509
544
"Split the pathname *path* into a pair, ``(head, tail)`` where *tail* is the "
510
545
"last pathname component and *head* is everything leading up to that. The "
@@ -522,7 +557,7 @@ msgstr ""
522
557
"末尾的斜杠会被去掉,除非它是根目录(即它仅包含一个或多个斜杠)。在所有情况下,``join(head, tail)`` 指向的位置都与 *path* "
523
558
"相同(但字符串可能不同)。另请参见函数 :func:`dirname` 和 :func:`basename`。"
524
559
525
- #: ../../library/os.path.rst:459
560
+ #: ../../library/os.path.rst:484
526
561
msgid ""
527
562
"Split the pathname *path* into a pair ``(drive, tail)`` where *drive* is "
528
563
"either a mount point or the empty string. On systems which do not use drive"
@@ -533,24 +568,24 @@ msgstr ""
533
568
"是挂载点或空字符串。在没有驱动器概念的系统上,*drive* 将始终为空字符串。在所有情况下,``drive + tail`` 都与 *path* "
534
569
"相同。"
535
570
536
- #: ../../library/os.path.rst:464
571
+ #: ../../library/os.path.rst:489
537
572
msgid ""
538
573
"On Windows, splits a pathname into drive/UNC sharepoint and relative path."
539
574
msgstr "在 Windows 上,本方法将路径拆分为驱动器/UNC 根节点和相对路径。"
540
575
541
- #: ../../library/os.path.rst:466
576
+ #: ../../library/os.path.rst:491
542
577
msgid ""
543
578
"If the path contains a drive letter, drive will contain everything up to and"
544
579
" including the colon::"
545
580
msgstr "如果路径 path 包含盘符,则 drive 将包含冒号之前的所有内容包括冒号本身::"
546
581
547
- #: ../../library/os.path.rst:472
582
+ #: ../../library/os.path.rst:497
548
583
msgid ""
549
584
"If the path contains a UNC path, drive will contain the host name and share,"
550
585
" up to but not including the fourth separator::"
551
586
msgstr "如果路径 path 包含 UNC 路径,则 drive 将包含主机名和 share,直至第四个分隔符但不包括该分隔符::"
552
587
553
- #: ../../library/os.path.rst:484
588
+ #: ../../library/os.path.rst:509
554
589
msgid ""
555
590
"Split the pathname *path* into a pair ``(root, ext)`` such that ``root + "
556
591
"ext == path``, and the extension, *ext*, is empty or begins with a period "
@@ -559,23 +594,23 @@ msgstr ""
559
594
"将路径名称 *path* 拆分为 ``(root, ext)`` 对使得 ``root + ext == path``,并且扩展名 *ext* "
560
595
"为空或以句点打头并最多只包含一个句点。"
561
596
562
- #: ../../library/os.path.rst:488
597
+ #: ../../library/os.path.rst:513
563
598
msgid "If the path contains no extension, *ext* will be ``''``::"
564
599
msgstr "如果路径 path 不包含扩展名,则 *ext* 将为 ``''``::"
565
600
566
- #: ../../library/os.path.rst:493
601
+ #: ../../library/os.path.rst:518
567
602
msgid ""
568
603
"If the path contains an extension, then *ext* will be set to this extension,"
569
604
" including the leading period. Note that previous periods will be ignored::"
570
605
msgstr "如果路径 path 包含扩展名,则 *ext* 将被设为该扩展名,包括打头的句点。 请注意在其之前的句点将被忽略::"
571
606
572
- #: ../../library/os.path.rst:501
607
+ #: ../../library/os.path.rst:526
573
608
msgid ""
574
609
"Leading periods of the last component of the path are considered to be part "
575
610
"of the root::"
576
611
msgstr "path 中最后一部分如果以点号开头则会被视为 root 的一部分::"
577
612
578
- #: ../../library/os.path.rst:515
613
+ #: ../../library/os.path.rst:540
579
614
msgid ""
580
615
"``True`` if arbitrary Unicode strings can be used as file names (within "
581
616
"limitations imposed by the file system)."
0 commit comments