Skip to content

Commit 2653f97

Browse files
sync with cpython 71dfe72b
1 parent 9687ca1 commit 2653f97

1 file changed

Lines changed: 56 additions & 49 deletions

File tree

library/functions.po

Lines changed: 56 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ msgid ""
1111
msgstr ""
1212
"Project-Id-Version: Python 3.14\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2026-07-19 00:28+0000\n"
14+
"POT-Creation-Date: 2026-07-30 00:28+0000\n"
1515
"PO-Revision-Date: 2025-07-28 21:38+0800\n"
1616
"Last-Translator: Weilin Du <1372449351@qq.com>\n"
1717
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -3749,26 +3749,33 @@ msgstr ""
37493749
"__init_subclass__`)。"
37503750

37513751
#: ../../library/functions.rst:2113
3752+
msgid ""
3753+
"Unlike a :keyword:`class` statement, the three argument form does not call "
3754+
"the metaclass ``__prepare__`` method (see :ref:`prepare`). Use :func:`types."
3755+
"new_class` to dynamically create a class using the appropriate metaclass."
3756+
msgstr ""
3757+
3758+
#: ../../library/functions.rst:2118
37523759
msgid "See also :ref:`class-customization`."
37533760
msgstr "另請參閱 :ref:`class-customization`。"
37543761

3755-
#: ../../library/functions.rst:2115
3762+
#: ../../library/functions.rst:2120
37563763
msgid ""
37573764
"Subclasses of :class:`!type` which don't override ``type.__new__`` may no "
37583765
"longer use the one-argument form to get the type of an object."
37593766
msgstr ""
37603767
"沒有覆寫 ``type.__new__`` 的 :class:`!type` 子類別不能再使用單引數形式來取得"
37613768
"物件的型別。"
37623769

3763-
#: ../../library/functions.rst:2122
3770+
#: ../../library/functions.rst:2127
37643771
msgid ""
37653772
"Return the :attr:`~object.__dict__` attribute for a module, class, instance, "
37663773
"or any other object with a :attr:`!__dict__` attribute."
37673774
msgstr ""
37683775
"回傳模組、類別、實例或任何其他具有 :attr:`!__dict__` 屬性的物件的 :attr:"
37693776
"`~object.__dict__` 屬性。"
37703777

3771-
#: ../../library/functions.rst:2125
3778+
#: ../../library/functions.rst:2130
37723779
msgid ""
37733780
"Objects such as modules and instances have an updateable :attr:`~object."
37743781
"__dict__` attribute; however, other objects may have write restrictions on "
@@ -3779,11 +3786,11 @@ msgstr ""
37793786
"物件的 :attr:`!__dict__` 屬性可能有寫入限制(例如,類別使用 :class:`types."
37803787
"MappingProxyType` 來防止直接更新字典)。"
37813788

3782-
#: ../../library/functions.rst:2130
3789+
#: ../../library/functions.rst:2135
37833790
msgid "Without an argument, :func:`vars` acts like :func:`locals`."
37843791
msgstr "不帶引數時,:func:`vars` 的行為與 :func:`locals` 相同。"
37853792

3786-
#: ../../library/functions.rst:2132
3793+
#: ../../library/functions.rst:2137
37873794
msgid ""
37883795
"A :exc:`TypeError` exception is raised if an object is specified but it "
37893796
"doesn't have a :attr:`~object.__dict__` attribute (for example, if its class "
@@ -3792,23 +3799,23 @@ msgstr ""
37923799
"如果指定了一個物件但它沒有 :attr:`~object.__dict__` 屬性(例如,如果它的類別"
37933800
"定義了 :attr:`~object.__slots__` 屬性),則會引發 :exc:`TypeError` 例外。"
37943801

3795-
#: ../../library/functions.rst:2138
3802+
#: ../../library/functions.rst:2143
37963803
msgid ""
37973804
"The result of calling this function without an argument has been updated as "
37983805
"described for the :func:`locals` builtin."
37993806
msgstr "不帶引數呼叫此函式的結果已按照內建函式 :func:`locals` 的說明進行更新。"
38003807

3801-
#: ../../library/functions.rst:2144
3808+
#: ../../library/functions.rst:2149
38023809
msgid ""
38033810
"Iterate over several iterables in parallel, producing tuples with an item "
38043811
"from each one."
38053812
msgstr "平行疊代多個可疊代物件,產生包含每個可疊代物件中一個項目的 tuple。"
38063813

3807-
#: ../../library/functions.rst:2147
3814+
#: ../../library/functions.rst:2152
38083815
msgid "Example::"
38093816
msgstr "例如: ::"
38103817

3811-
#: ../../library/functions.rst:2149
3818+
#: ../../library/functions.rst:2154
38123819
msgid ""
38133820
">>> for item in zip([1, 2, 3], ['sugar', 'spice', 'everything nice']):\n"
38143821
"... print(item)\n"
@@ -3824,15 +3831,15 @@ msgstr ""
38243831
"(2, 'spice')\n"
38253832
"(3, 'everything nice')"
38263833

3827-
#: ../../library/functions.rst:2156
3834+
#: ../../library/functions.rst:2161
38283835
msgid ""
38293836
"More formally: :func:`zip` returns an iterator of tuples, where the *i*-th "
38303837
"tuple contains the *i*-th element from each of the argument iterables."
38313838
msgstr ""
38323839
"更正式地說::func:`zip` 回傳一個由 tuple 組成的疊代器,其中第 *i* 個 tuple 包"
38333840
"含來自每個引數可疊代物件的第 *i* 個元素。"
38343841

3835-
#: ../../library/functions.rst:2159
3842+
#: ../../library/functions.rst:2164
38363843
msgid ""
38373844
"Another way to think of :func:`zip` is that it turns rows into columns, and "
38383845
"columns into rows. This is similar to `transposing a matrix <https://en."
@@ -3841,7 +3848,7 @@ msgstr ""
38413848
"另一種理解 :func:`zip` 的方式是它將列(row)轉換為行(column),將行轉換為"
38423849
"列。這類似於\\ `轉置矩陣 <https://en.wikipedia.org/wiki/Transpose>`_。"
38433850

3844-
#: ../../library/functions.rst:2163
3851+
#: ../../library/functions.rst:2168
38453852
msgid ""
38463853
":func:`zip` is lazy: The elements won't be processed until the iterable is "
38473854
"iterated on, e.g. by a :keyword:`!for` loop or by wrapping in a :class:"
@@ -3850,7 +3857,7 @@ msgstr ""
38503857
":func:`zip` 是惰性的 (lazy):元素在可疊代物件被疊代之前不會被處理,例如透過一"
38513858
"個 :keyword:`!for` 迴圈或包裝在一個 :class:`list` 中。"
38523859

3853-
#: ../../library/functions.rst:2167
3860+
#: ../../library/functions.rst:2172
38543861
msgid ""
38553862
"One thing to consider is that the iterables passed to :func:`zip` could have "
38563863
"different lengths; sometimes by design, and sometimes because of a bug in "
@@ -3861,7 +3868,7 @@ msgstr ""
38613868
"刻意設計的,有時候是因為準備這些可疊代物件的程式碼中的錯誤。Python 提供三種不"
38623869
"同的方式來處理這個問題:"
38633870

3864-
#: ../../library/functions.rst:2172
3871+
#: ../../library/functions.rst:2177
38653872
msgid ""
38663873
"By default, :func:`zip` stops when the shortest iterable is exhausted. It "
38673874
"will ignore the remaining items in the longer iterables, cutting off the "
@@ -3870,15 +3877,15 @@ msgstr ""
38703877
"預設情況下,:func:`zip` 會在最短的可疊代物件用盡時停止。它會忽略較長可疊代物"
38713878
"件中的剩餘項目,將結果截斷到最短可疊代物件的長度: ::"
38723879

3873-
#: ../../library/functions.rst:2176
3880+
#: ../../library/functions.rst:2181
38743881
msgid ""
38753882
">>> list(zip(range(3), ['fee', 'fi', 'fo', 'fum']))\n"
38763883
"[(0, 'fee'), (1, 'fi'), (2, 'fo')]"
38773884
msgstr ""
38783885
">>> list(zip(range(3), ['fee', 'fi', 'fo', 'fum']))\n"
38793886
"[(0, 'fee'), (1, 'fi'), (2, 'fo')]"
38803887

3881-
#: ../../library/functions.rst:2179
3888+
#: ../../library/functions.rst:2184
38823889
msgid ""
38833890
":func:`zip` is often used in cases where the iterables are assumed to be of "
38843891
"equal length. In such cases, it's recommended to use the ``strict=True`` "
@@ -3887,23 +3894,23 @@ msgstr ""
38873894
":func:`zip` 常常用於可疊代物件被假設等長的情況。在這種情況下,建議使用 "
38883895
"``strict=True`` 選項。它的輸出與一般的 :func:`zip` 相同: ::"
38893896

3890-
#: ../../library/functions.rst:2183
3897+
#: ../../library/functions.rst:2188
38913898
msgid ""
38923899
">>> list(zip(('a', 'b', 'c'), (1, 2, 3), strict=True))\n"
38933900
"[('a', 1), ('b', 2), ('c', 3)]"
38943901
msgstr ""
38953902
">>> list(zip(('a', 'b', 'c'), (1, 2, 3), strict=True))\n"
38963903
"[('a', 1), ('b', 2), ('c', 3)]"
38973904

3898-
#: ../../library/functions.rst:2186
3905+
#: ../../library/functions.rst:2191
38993906
msgid ""
39003907
"Unlike the default behavior, it raises a :exc:`ValueError` if one iterable "
39013908
"is exhausted before the others:"
39023909
msgstr ""
39033910
"與預設行為不同的是,如果有一個可疊代物件先於其他可疊代物件耗盡,它會引發 :"
39043911
"exc:`ValueError`:"
39053912

3906-
#: ../../library/functions.rst:2204
3913+
#: ../../library/functions.rst:2209
39073914
msgid ""
39083915
"Without the ``strict=True`` argument, any bug that results in iterables of "
39093916
"different lengths will be silenced, possibly manifesting as a hard-to-find "
@@ -3912,7 +3919,7 @@ msgstr ""
39123919
"如果沒有 ``strict=True`` 引數,任何導致可疊代物件長度不同的 bug 都會被隱藏,"
39133920
"可能會在程式的其他部分表現為難以發現的 bug。"
39143921

3915-
#: ../../library/functions.rst:2208
3922+
#: ../../library/functions.rst:2213
39163923
msgid ""
39173924
"Shorter iterables can be padded with a constant value to make all the "
39183925
"iterables have the same length. This is done by :func:`itertools."
@@ -3921,19 +3928,19 @@ msgstr ""
39213928
"較短的可疊代物件可以填充常數值,使所有可疊代物件的長度相同。這可以透過 :func:"
39223929
"`itertools.zip_longest` 來完成。"
39233930

3924-
#: ../../library/functions.rst:2212
3931+
#: ../../library/functions.rst:2217
39253932
msgid ""
39263933
"Edge cases: With a single iterable argument, :func:`zip` returns an iterator "
39273934
"of 1-tuples. With no arguments, it returns an empty iterator."
39283935
msgstr ""
39293936
"邊界情況:對於單一可疊代引數,:func:`zip` 會回傳一個 1-tuple 的疊代器。如果沒"
39303937
"有引數,它會回傳一個空的疊代器。"
39313938

3932-
#: ../../library/functions.rst:2215
3939+
#: ../../library/functions.rst:2220
39333940
msgid "Tips and tricks:"
39343941
msgstr "秘訣與技巧:"
39353942

3936-
#: ../../library/functions.rst:2217
3943+
#: ../../library/functions.rst:2222
39373944
msgid ""
39383945
"The left-to-right evaluation order of the iterables is guaranteed. This "
39393946
"makes possible an idiom for clustering a data series into n-length groups "
@@ -3946,13 +3953,13 @@ msgstr ""
39463953
"同的*\\ 疊代器 ``n`` 次,因此每個輸出 tuple 會有 ``n`` 次呼叫疊代器的結果。這"
39473954
"樣做的效果是將輸入分割成 n 個長度的區塊。"
39483955

3949-
#: ../../library/functions.rst:2223
3956+
#: ../../library/functions.rst:2228
39503957
msgid ""
39513958
":func:`zip` in conjunction with the ``*`` operator can be used to unzip a "
39523959
"list::"
39533960
msgstr ":func:`zip` 與 ``*`` 運算子結合可以用來解壓縮 (unzip) 一個 list: ::"
39543961

3955-
#: ../../library/functions.rst:2226
3962+
#: ../../library/functions.rst:2231
39563963
msgid ""
39573964
">>> x = [1, 2, 3]\n"
39583965
">>> y = [4, 5, 6]\n"
@@ -3970,19 +3977,19 @@ msgstr ""
39703977
">>> x == list(x2) and y == list(y2)\n"
39713978
"True"
39723979

3973-
#: ../../library/functions.rst:2234
3980+
#: ../../library/functions.rst:2239
39743981
msgid "Added the ``strict`` argument."
39753982
msgstr "增加了 ``strict`` 引數。"
39763983

3977-
#: ../../library/functions.rst:2246
3984+
#: ../../library/functions.rst:2251
39783985
msgid ""
39793986
"This is an advanced function that is not needed in everyday Python "
39803987
"programming, unlike :func:`importlib.import_module`."
39813988
msgstr ""
39823989
"這是一個進階的函式,不像 :func:`importlib.import_module`,這在日常 Python 程"
39833990
"式設計中並不需要。"
39843991

3985-
#: ../../library/functions.rst:2249
3992+
#: ../../library/functions.rst:2254
39863993
msgid ""
39873994
"This function is invoked by the :keyword:`import` statement. It can be "
39883995
"replaced (by importing the :mod:`builtins` module and assigning to "
@@ -4000,7 +4007,7 @@ msgstr ""
40004007
"import 實作的程式碼問題。我們也不鼓勵直接使用 :func:`__import__`,而應改用 :"
40014008
"func:`importlib.import_module`。"
40024009

4003-
#: ../../library/functions.rst:2258
4010+
#: ../../library/functions.rst:2263
40044011
msgid ""
40054012
"The function imports the module *name*, potentially using the given "
40064013
"*globals* and *locals* to determine how to interpret the name in a package "
@@ -4014,7 +4021,7 @@ msgstr ""
40144021
"模組的名稱。標準的實作完全不使用 *locals* 引數,而只使用 *globals* 來決定 :"
40154022
"keyword:`import` 陳述式的套件情境。"
40164023

4017-
#: ../../library/functions.rst:2265
4024+
#: ../../library/functions.rst:2270
40184025
msgid ""
40194026
"*level* specifies whether to use absolute or relative imports. ``0`` (the "
40204027
"default) means only perform absolute imports. Positive values for *level* "
@@ -4026,7 +4033,7 @@ msgstr ""
40264033
"正值表示相對於呼叫 :func:`__import__` 的模組目錄要搜尋的父目錄數目(參見 :"
40274034
"pep:`328` 以了解詳情)。"
40284035

4029-
#: ../../library/functions.rst:2271
4036+
#: ../../library/functions.rst:2276
40304037
msgid ""
40314038
"When the *name* variable is of the form ``package.module``, normally, the "
40324039
"top-level package (the name up till the first dot) is returned, *not* the "
@@ -4037,41 +4044,41 @@ msgstr ""
40374044
"一個點為止的名稱),而\\ *不是* *name* 所命名的模組。然而,當給予一個非空的 "
40384045
"*fromlist* 引數時,會回傳以 *name* 命名的模組。"
40394046

4040-
#: ../../library/functions.rst:2276
4047+
#: ../../library/functions.rst:2281
40414048
msgid ""
40424049
"For example, the statement ``import spam`` results in bytecode resembling "
40434050
"the following code::"
40444051
msgstr ""
40454052
"例如,陳述式 ``import spam`` 會產生類似以下程式碼的位元組碼 (bytecode): ::"
40464053

4047-
#: ../../library/functions.rst:2279
4054+
#: ../../library/functions.rst:2284
40484055
msgid "spam = __import__('spam', globals(), locals(), [], 0)"
40494056
msgstr "spam = __import__('spam', globals(), locals(), [], 0)"
40504057

4051-
#: ../../library/functions.rst:2281
4058+
#: ../../library/functions.rst:2286
40524059
msgid "The statement ``import spam.ham`` results in this call::"
40534060
msgstr "陳述式 ``import spam.ham`` 的結果是這樣的呼叫: ::"
40544061

4055-
#: ../../library/functions.rst:2283
4062+
#: ../../library/functions.rst:2288
40564063
msgid "spam = __import__('spam.ham', globals(), locals(), [], 0)"
40574064
msgstr "spam = __import__('spam.ham', globals(), locals(), [], 0)"
40584065

4059-
#: ../../library/functions.rst:2285
4066+
#: ../../library/functions.rst:2290
40604067
msgid ""
40614068
"Note how :func:`__import__` returns the toplevel module here because this is "
40624069
"the object that is bound to a name by the :keyword:`import` statement."
40634070
msgstr ""
40644071
"請注意 :func:`__import__` 在這裡如何回傳頂層模組(toplevel module),因為這是"
40654072
"由 :keyword:`import` 陳述式綁定名稱的物件。"
40664073

4067-
#: ../../library/functions.rst:2288
4074+
#: ../../library/functions.rst:2293
40684075
msgid ""
40694076
"On the other hand, the statement ``from spam.ham import eggs, sausage as "
40704077
"saus`` results in ::"
40714078
msgstr ""
40724079
"另一方面,陳述式 ``from spam.ham import eggs, sausage as saus`` 結果是: ::"
40734080

4074-
#: ../../library/functions.rst:2291
4081+
#: ../../library/functions.rst:2296
40754082
msgid ""
40764083
"_temp = __import__('spam.ham', globals(), locals(), ['eggs', 'sausage'], 0)\n"
40774084
"eggs = _temp.eggs\n"
@@ -4081,7 +4088,7 @@ msgstr ""
40814088
"eggs = _temp.eggs\n"
40824089
"saus = _temp.sausage"
40834090

4084-
#: ../../library/functions.rst:2295
4091+
#: ../../library/functions.rst:2300
40854092
msgid ""
40864093
"Here, the ``spam.ham`` module is returned from :func:`__import__`. From "
40874094
"this object, the names to import are retrieved and assigned to their "
@@ -4090,33 +4097,33 @@ msgstr ""
40904097
"這裡,``spam.ham`` 模組會從 :func:`__import__` 回傳。從這個物件中,要引入的名"
40914098
"稱會被擷取並指定給它們各自的名稱。"
40924099

4093-
#: ../../library/functions.rst:2299
4100+
#: ../../library/functions.rst:2304
40944101
msgid ""
40954102
"If you simply want to import a module (potentially within a package) by "
40964103
"name, use :func:`importlib.import_module`."
40974104
msgstr ""
40984105
"如果你只想依名稱引入一個模組(可能在套件中),請使用 :func:`importlib."
40994106
"import_module`。"
41004107

4101-
#: ../../library/functions.rst:2302
4108+
#: ../../library/functions.rst:2307
41024109
msgid ""
41034110
"Negative values for *level* are no longer supported (which also changes the "
41044111
"default value to 0)."
41054112
msgstr "不再支援 *level* 的負值(這也將預設值變為 0)。"
41064113

4107-
#: ../../library/functions.rst:2306
4114+
#: ../../library/functions.rst:2311
41084115
msgid ""
41094116
"When the command line options :option:`-E` or :option:`-I` are being used, "
41104117
"the environment variable :envvar:`PYTHONCASEOK` is now ignored."
41114118
msgstr ""
41124119
"當使用命令列選項 :option:`-E` 或 :option:`-I` 時,環境變數 :envvar:"
41134120
"`PYTHONCASEOK` 現在會被忽略。"
41144121

4115-
#: ../../library/functions.rst:2311
4122+
#: ../../library/functions.rst:2316
41164123
msgid "Footnotes"
41174124
msgstr "註腳"
41184125

4119-
#: ../../library/functions.rst:2312
4126+
#: ../../library/functions.rst:2317
41204127
msgid ""
41214128
"Note that the parser only accepts the Unix-style end of line convention. If "
41224129
"you are reading the code from a file, make sure to use newline conversion "
@@ -4205,7 +4212,7 @@ msgstr "buffering(緩衝)"
42054212
msgid "text mode"
42064213
msgstr "text mode(文字模式)"
42074214

4208-
#: ../../library/functions.rst:1524 ../../library/functions.rst:2240
4215+
#: ../../library/functions.rst:1524 ../../library/functions.rst:2245
42094216
msgid "module"
42104217
msgstr "module(模組)"
42114218

@@ -4221,14 +4228,14 @@ msgstr "str() (內建函式)"
42214228
msgid "object"
42224229
msgstr "object(物件)"
42234230

4224-
#: ../../library/functions.rst:2240
4231+
#: ../../library/functions.rst:2245
42254232
msgid "statement"
42264233
msgstr "statement(陳述式)"
42274234

4228-
#: ../../library/functions.rst:2240
4235+
#: ../../library/functions.rst:2245
42294236
msgid "import"
42304237
msgstr "import(引入)"
42314238

4232-
#: ../../library/functions.rst:2240
4239+
#: ../../library/functions.rst:2245
42334240
msgid "builtins"
42344241
msgstr "builtins(內建)"

0 commit comments

Comments
 (0)