1
- # SOME DESCRIPTIVE TITLE.
2
1
# Copyright (C) 2001-2022, Python Software Foundation
3
2
# This file is distributed under the same license as the Python package.
4
- # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
3
#
6
- #, fuzzy
4
+ # Translators:
5
+ # Matt Wang <mattwang44@gmail.com>, 2022
6
+ #
7
7
msgid ""
8
8
msgstr ""
9
9
"Project-Id-Version : Python 3.11\n "
10
10
"Report-Msgid-Bugs-To : \n "
11
11
"POT-Creation-Date : 2022-10-06 00:23+0000\n "
12
- "PO-Revision-Date : YEAR-MO-DA HO:MI+ZONE \n "
13
- "Last-Translator : FULL NAME <EMAIL@ADDRESS >\n "
12
+ "PO-Revision-Date : 2022-10-16 16:16+0800 \n "
13
+ "Last-Translator : Matt Wang <mattwang44@gmail.com >\n "
14
14
"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
15
15
"tw)\n "
16
16
"Language : zh_TW\n "
17
17
"MIME-Version : 1.0\n "
18
18
"Content-Type : text/plain; charset=UTF-8\n "
19
19
"Content-Transfer-Encoding : 8bit\n "
20
+ "X-Generator : Poedit 3.1.1\n "
20
21
21
22
#: ../../c-api/typehints.rst:6
22
23
msgid "Objects for Type Hinting"
23
- msgstr ""
24
+ msgstr "型別提示物件 "
24
25
25
26
#: ../../c-api/typehints.rst:8
26
27
msgid ""
27
28
"Various built-in types for type hinting are provided. Currently, two types "
28
29
"exist -- :ref:`GenericAlias <types-genericalias>` and :ref:`Union <types-"
29
30
"union>`. Only ``GenericAlias`` is exposed to C."
30
31
msgstr ""
32
+ "提供了數個用於型別提示的內建型別。目前有兩種 -- :ref:`GenericAlias <types-"
33
+ "genericalias>` 和 :ref:`Union <types-union>`。只有 ``GenericAlias`` 有公開 "
34
+ "(expose) 給 C。"
31
35
32
36
#: ../../c-api/typehints.rst:14
33
37
msgid ""
@@ -43,17 +47,31 @@ msgid ""
43
47
"lazily from ``__args__``. On failure, an exception is raised and ``NULL`` "
44
48
"is returned."
45
49
msgstr ""
50
+ "建立一個 :ref:`GenericAlias <types-genericalias>` 物件,等同於呼叫 Python "
51
+ "的 :class:`types.GenericAlias` class。*origin* 和 *args* 引數分別設定了 "
52
+ "`GenericAlias`` 的 ``__origin__`` 與 ``__args__`` 屬性。*origin* 應該要是個 :"
53
+ "c:expr:`PyTypeObject*` 且 *args* 可以是個 :c:expr:`PyTupleObject*` 或任意 "
54
+ "``PyObject*``。如果傳入的 *args* 不是個 tuple(元組),則會自動建立一個長度"
55
+ "為 1 的 tuple 且 ``__args__`` 會被設為 ``(args,)``。只會進行最少的引數檢查,"
56
+ "所以即便 *origin* 不是個型別,函式也會不會失敗。``GenericAlias`` 的 "
57
+ "``__parameters__`` 屬性會自 ``__args__`` 惰性地建立 (constructed lazily)。當"
58
+ "失敗時,會引發一個例外並回傳``NULL``。"
46
59
47
60
#: ../../c-api/typehints.rst:28
48
61
msgid "Here's an example of how to make an extension type generic::"
49
62
msgstr ""
63
+ "以下是個讓一個擴充型別泛用化 (generic) 的例子:\n"
64
+ "\n"
65
+ "::"
50
66
51
67
#: ../../c-api/typehints.rst:38
52
68
msgid "The data model method :meth:`__class_getitem__`."
53
- msgstr ""
69
+ msgstr "資料模型方法 :meth:`__class_getitem__`。 "
54
70
55
71
#: ../../c-api/typehints.rst:44
56
72
msgid ""
57
73
"The C type of the object returned by :c:func:`Py_GenericAlias`. Equivalent "
58
74
"to :class:`types.GenericAlias` in Python."
59
75
msgstr ""
76
+ ":c:func:`Py_GenericAlias` 所回傳該物件的 C 型別。等價於 Python 中的 :class:"
77
+ "`types.GenericAlias`。"
0 commit comments