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

Commit7a9dab8

Browse files
github-actions[bot]mattwang44
authored andcommitted
sync with cpython 077cb7ca
1 parent7afd6d4 commit7a9dab8

File tree

2 files changed

+56
-37
lines changed

2 files changed

+56
-37
lines changed

‎library/tomllib.po

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version:Python 3.12\n"
99
"Report-Msgid-Bugs-To:\n"
10-
"POT-Creation-Date:2022-10-15 20:43+0000\n"
10+
"POT-Creation-Date:2023-12-19 13:45+0000\n"
1111
"PO-Revision-Date:2022-11-18 01:56+0800\n"
1212
"Last-Translator:Matt Wang <mattwang44@gmail.com>\n"
1313
"Language-Team:Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -136,10 +136,11 @@ msgid "Python"
136136
msgstr"Python"
137137

138138
#:../../library/tomllib.rst:98
139-
msgid"table"
140-
msgstr"table"
139+
msgid"TOML document"
140+
msgstr""
141141

142-
#:../../library/tomllib.rst:98
142+
#:../../library/tomllib.rst:98../../library/tomllib.rst:118
143+
#:../../library/tomllib.rst:120
143144
msgid"dict"
144145
msgstr"dict"
145146

@@ -217,3 +218,19 @@ msgstr "array"
217218
#:../../library/tomllib.rst:116
218219
msgid"list"
219220
msgstr"list"
221+
222+
#:../../library/tomllib.rst:118
223+
msgid"table"
224+
msgstr"table"
225+
226+
#:../../library/tomllib.rst:120
227+
msgid"inline table"
228+
msgstr""
229+
230+
#:../../library/tomllib.rst:122
231+
msgid"array of tables"
232+
msgstr""
233+
234+
#:../../library/tomllib.rst:122
235+
msgid"list of dicts"
236+
msgstr""

‎tutorial/modules.po

Lines changed: 35 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ msgid ""
1111
msgstr ""
1212
"Project-Id-Version:Python 3.12\n"
1313
"Report-Msgid-Bugs-To:\n"
14-
"POT-Creation-Date:2023-08-22 00:03+0000\n"
14+
"POT-Creation-Date:2023-12-19 13:45+0000\n"
1515
"PO-Revision-Date:2022-10-23 20:30+0800\n"
1616
"Last-Translator:Phil Lin <linooohon@gmail.com>\n"
1717
"Language-Team:Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -560,20 +560,22 @@ msgid ""
560560
msgstr"Import 套件時,Python 會搜尋 ``sys.path`` 裡的目錄,尋找套件的子目錄。"
561561

562562
#:../../tutorial/modules.rst:439
563+
#,fuzzy
563564
msgid""
564565
"The :file:`__init__.py` files are required to make Python treat directories "
565-
"containing the file as packages. This prevents directories with a common "
566-
"name, such as ``string``, from unintentionally hiding valid modules that "
567-
"occur later on the module search path. In the simplest case, :file:`__init__."
568-
"py` can just be an empty file, but it can also execute initialization code "
569-
"for the package or set the ``__all__`` variable, described later."
566+
"containing the file as packages (unless using a :term:`namespace package`, a "
567+
"relatively advanced feature). This prevents directories with a common name, "
568+
"such as ``string``, from unintentionally hiding valid modules that occur "
569+
"later on the module search path. In the simplest case, :file:`__init__.py` "
570+
"can just be an empty file, but it can also execute initialization code for "
571+
"the package or set the ``__all__`` variable, described later."
570572
msgstr""
571573
"目錄中必須含有 :file:`__init__.py` 檔案,才會被 Pyhon 當成套件;這樣可以避免"
572574
"一些以常用名稱命名(例如 ``string``\\ )的目錄,無意中隱藏了較晚出現在模組搜"
573575
"尋路徑中的有效模組。在最簡單的情況,:file:`__init__.py` 可以只是一個空白檔"
574576
"案;但它也可以執行套件的初始化程式碼,或設置 ``__all__`` 變數,之後會詳述。"
575577

576-
#:../../tutorial/modules.rst:446
578+
#:../../tutorial/modules.rst:447
577579
msgid""
578580
"Users of the package can import individual modules from the package, for "
579581
"example::"
@@ -582,7 +584,7 @@ msgstr ""
582584
"\n"
583585
"::"
584586

585-
#:../../tutorial/modules.rst:451
587+
#:../../tutorial/modules.rst:452
586588
msgid""
587589
"This loads the submodule :mod:`!sound.effects.echo`. It must be referenced "
588590
"with its full name. ::"
@@ -591,14 +593,14 @@ msgstr ""
591593
"\n"
592594
"::"
593595

594-
#:../../tutorial/modules.rst:456
596+
#:../../tutorial/modules.rst:457
595597
msgid"An alternative way of importing the submodule is::"
596598
msgstr""
597599
"另一種 import 子模組的方法是:\n"
598600
"\n"
599601
"::"
600602

601-
#:../../tutorial/modules.rst:460
603+
#:../../tutorial/modules.rst:461
602604
msgid""
603605
"This also loads the submodule :mod:`!echo`, and makes it available without "
604606
"its package prefix, so it can be used as follows::"
@@ -608,7 +610,7 @@ msgstr ""
608610
"\n"
609611
"::"
610612

611-
#:../../tutorial/modules.rst:465
613+
#:../../tutorial/modules.rst:466
612614
msgid""
613615
"Yet another variation is to import the desired function or variable "
614616
"directly::"
@@ -617,7 +619,7 @@ msgstr ""
617619
"\n"
618620
"::"
619621

620-
#:../../tutorial/modules.rst:469
622+
#:../../tutorial/modules.rst:470
621623
msgid""
622624
"Again, this loads the submodule :mod:`!echo`, but this makes its function :"
623625
"func:`!echofilter` directly available::"
@@ -627,7 +629,7 @@ msgstr ""
627629
"\n"
628630
"::"
629631

630-
#:../../tutorial/modules.rst:474
632+
#:../../tutorial/modules.rst:475
631633
msgid""
632634
"Note that when using ``from package import item``, the item can be either a "
633635
"submodule (or subpackage) of the package, or some other name defined in the "
@@ -641,7 +643,7 @@ msgstr ""
641643
"陳述式首先測試套件中有沒有定義該 item;如果沒有,則會假設它是模組,並嘗試載"
642644
"入。如果還是找不到 item,則會引發 :exc:`ImportError` 例外。"
643645

644-
#:../../tutorial/modules.rst:481
646+
#:../../tutorial/modules.rst:482
645647
msgid""
646648
"Contrarily, when using syntax like ``import item.subitem.subsubitem``, each "
647649
"item except for the last must be a package; the last item can be a module or "
@@ -652,11 +654,11 @@ msgstr ""
652654
"一項都必須是套件;最後一項可以是模組或套件,但不能是前一項中定義的 class、函"
653655
"式或變數。"
654656

655-
#:../../tutorial/modules.rst:490
657+
#:../../tutorial/modules.rst:491
656658
msgid"Importing\\* From a Package"
657659
msgstr"從套件中 import\\*"
658660

659-
#:../../tutorial/modules.rst:494
661+
#:../../tutorial/modules.rst:495
660662
msgid""
661663
"Now what happens when the user writes ``from sound.effects import *``? "
662664
"Ideally, one would hope that this somehow goes out to the filesystem, finds "
@@ -669,7 +671,7 @@ msgstr ""
669671
"會花費較長的時間,且 import 子模組的過程可能會有不必要的副作用,這些副作用只"
670672
"有在明確地 import 子模組時才會發生。"
671673

672-
#:../../tutorial/modules.rst:500
674+
#:../../tutorial/modules.rst:501
673675
msgid""
674676
"The only solution is for the package author to provide an explicit index of "
675677
"the package. The :keyword:`import` statement uses the following convention: "
@@ -690,15 +692,15 @@ msgstr ""
690692
"\n"
691693
"::"
692694

693-
#:../../tutorial/modules.rst:512
695+
#:../../tutorial/modules.rst:513
694696
msgid""
695697
"This would mean that ``from sound.effects import *`` would import the three "
696698
"named submodules of the :mod:`!sound.effects` package."
697699
msgstr""
698700
"意思是,``from sound.effects import *`` 將會 import :mod:`!sound.effects` 套"
699701
"件中,這三個被提名的子模組。"
700702

701-
#:../../tutorial/modules.rst:515
703+
#:../../tutorial/modules.rst:516
702704
msgid""
703705
"Be aware that submodules might become shadowed by locally defined names. For "
704706
"example, if you added a ``reverse`` function to the :file:`sound/effects/"
@@ -713,7 +715,7 @@ msgstr ""
713715
"但\\ *不是* ``reverse`` 子模組,因為它被區域定義的 ``reverse`` 函式遮蔽"
714716
"了: ::"
715717

716-
#:../../tutorial/modules.rst:531
718+
#:../../tutorial/modules.rst:532
717719
msgid""
718720
"If ``__all__`` is not defined, the statement ``from sound.effects import *`` "
719721
"does *not* import all submodules from the package :mod:`!sound.effects` into "
@@ -734,7 +736,7 @@ msgstr ""
734736
"\n"
735737
"::"
736738

737-
#:../../tutorial/modules.rst:544
739+
#:../../tutorial/modules.rst:545
738740
msgid""
739741
"In this example, the :mod:`!echo` and :mod:`!surround` modules are imported "
740742
"in the current namespace because they are defined in the :mod:`!sound."
@@ -745,7 +747,7 @@ msgstr ""
745747
"surround` 模組被 import 進當前的命名空間,因為它們是在 :mod:`!sound.effects` "
746748
"套件裡定義的。(當 ``__all__`` 有被定義時,這規則也有效。)"
747749

748-
#:../../tutorial/modules.rst:549
750+
#:../../tutorial/modules.rst:550
749751
msgid""
750752
"Although certain modules are designed to export only names that follow "
751753
"certain patterns when you use ``import *``, it is still considered bad "
@@ -754,7 +756,7 @@ msgstr ""
754756
"雖然,有些特定模組的設計,讓你使用 ``import *`` 時,該模組只會輸出遵循特定樣"
755757
"式的名稱,但在正式環境 (production) 的程式碼中這仍然被視為是不良習慣。"
756758

757-
#:../../tutorial/modules.rst:553
759+
#:../../tutorial/modules.rst:554
758760
msgid""
759761
"Remember, there is nothing wrong with using ``from package import "
760762
"specific_submodule``! In fact, this is the recommended notation unless the "
@@ -764,11 +766,11 @@ msgstr ""
764766
"記住,使用 ``from package import specific_submodule`` 不會有任何問題!實際"
765767
"上,這是推薦用法,除非 import 的模組需要用到的子模組和其他套件的子模組同名。"
766768

767-
#:../../tutorial/modules.rst:562
769+
#:../../tutorial/modules.rst:563
768770
msgid"Intra-package References"
769771
msgstr"套件內引用"
770772

771-
#:../../tutorial/modules.rst:564
773+
#:../../tutorial/modules.rst:565
772774
msgid""
773775
"When packages are structured into subpackages (as with the :mod:`!sound` "
774776
"package in the example), you can use absolute imports to refer to submodules "
@@ -781,7 +783,7 @@ msgstr ""
781783
"filters.vocoder` 模組中使用 :mod:`!sound.effects` 中的 :mod:`!echo` 模組時,"
782784
"可以用 ``from sound.effects import echo``。"
783785

784-
#:../../tutorial/modules.rst:570
786+
#:../../tutorial/modules.rst:571
785787
msgid""
786788
"You can also write relative imports, with the ``from module import name`` "
787789
"form of import statement. These imports use leading dots to indicate the "
@@ -794,7 +796,7 @@ msgstr ""
794796
"\n"
795797
"::"
796798

797-
#:../../tutorial/modules.rst:579
799+
#:../../tutorial/modules.rst:580
798800
msgid""
799801
"Note that relative imports are based on the name of the current module. "
800802
"Since the name of the main module is always ``\"__main__\"``, modules "
@@ -805,11 +807,11 @@ msgstr ""
805807
"``\"__main__\"``,所以如果一個模組預期被用作 Python 應用程式的主模組,那它必"
806808
"須永遠使用絕對 import。"
807809

808-
#:../../tutorial/modules.rst:585
810+
#:../../tutorial/modules.rst:586
809811
msgid"Packages in Multiple Directories"
810812
msgstr"多目錄中的套件"
811813

812-
#:../../tutorial/modules.rst:587
814+
#:../../tutorial/modules.rst:588
813815
msgid""
814816
"Packages support one more special attribute, :attr:`__path__`. This is "
815817
"initialized to be a list containing the name of the directory holding the "
@@ -821,17 +823,17 @@ msgstr ""
821823
"的 :file:`__init__.py` 檔案所在的目錄名稱,初始化時機是在這個檔案的程式碼被執"
822824
"行之前。這個變數可以被修改,但這樣做會影響將來對套件內的模組和子套件的搜尋。"
823825

824-
#:../../tutorial/modules.rst:593
826+
#:../../tutorial/modules.rst:594
825827
msgid""
826828
"While this feature is not often needed, it can be used to extend the set of "
827829
"modules found in a package."
828830
msgstr"雖然這個特色不太常被需要,但它可用於擴充套件中的模組集合。"
829831

830-
#:../../tutorial/modules.rst:598
832+
#:../../tutorial/modules.rst:599
831833
msgid"Footnotes"
832834
msgstr"註解"
833835

834-
#:../../tutorial/modules.rst:599
836+
#:../../tutorial/modules.rst:600
835837
msgid""
836838
"In fact function definitions are also 'statements' that are 'executed'; the "
837839
"execution of a module-level function definition adds the function name to "
@@ -861,6 +863,6 @@ msgstr "sys"
861863
msgid"builtins"
862864
msgstr"builtins(內建)"
863865

864-
#:../../tutorial/modules.rst:492
866+
#:../../tutorial/modules.rst:493
865867
msgid"__all__"
866868
msgstr"__all__"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp