forked from python/python-docs-zh-tw
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmarshal.po
More file actions
152 lines (136 loc) · 6.69 KB
/
marshal.po
File metadata and controls
152 lines (136 loc) · 6.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# Copyright (C) 2001-2025, Python Software Foundation
# This file is distributed under the same license as the Python package.
#
# Translators:
# Adrian Liaw <adrianliaw2000@gmail.com>, 2018
# Matt Wang <mattwang44@gmail.com>, 2025
msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-07-20 00:03+0000\n"
"PO-Revision-Date: 2025-06-28 02:44+0800\n"
"Last-Translator: Matt Wang <mattwang44@gmail.com>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
"tw)\n"
"Language: zh_TW\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Poedit 3.6\n"
#: ../../c-api/marshal.rst:6
msgid "Data marshalling support"
msgstr "資料 marshal 操作的支援"
#: ../../c-api/marshal.rst:8
msgid ""
"These routines allow C code to work with serialized objects using the same "
"data format as the :mod:`marshal` module. There are functions to write data "
"into the serialization format, and additional functions that can be used to "
"read the data back. Files used to store marshalled data must be opened in "
"binary mode."
msgstr ""
"這些例程允許 C 程式碼使用與 :mod:`marshal` 模組相同的資料格式來處理序列化物"
"件。有函式可以將資料寫入序列化格式,還有其他函式可以用來讀取回資料。用來儲存 "
"marshal 過的資料的檔案必須以二進位模式開啟。"
#: ../../c-api/marshal.rst:14
msgid "Numeric values are stored with the least significant byte first."
msgstr "數值會以最低有效位元組 (the least significant byte) 優先的方式儲存。"
#: ../../c-api/marshal.rst:16
msgid ""
"The module supports two versions of the data format: version 0 is the "
"historical version, version 1 shares interned strings in the file, and upon "
"unmarshalling. Version 2 uses a binary format for floating-point numbers. "
"``Py_MARSHAL_VERSION`` indicates the current file format (currently 2)."
msgstr ""
"這個模組支援兩個版本的資料格式:版本 0 是歷史版本,版本 1 在檔案中共享駐留字"
"串 (interned strings),並在 unmarshal 時使用。版本 2 使用二進位格式來儲存浮點"
"數。``Py_MARSHAL_VERSION`` 表示目前的檔案格式(目前為 2)。"
#: ../../c-api/marshal.rst:24
msgid ""
"Marshal a :c:expr:`long` integer, *value*, to *file*. This will only write "
"the least-significant 32 bits of *value*; regardless of the size of the "
"native :c:expr:`long` type. *version* indicates the file format."
msgstr ""
"將一個 :c:expr:`long` 整數 *value* marshal 為 *file*。這只會寫入 *value* 的最"
"低有效 32 位元;無論原生 :c:expr:`long` 型別的大小如何。*version* 表示檔案的格"
"式。"
#: ../../c-api/marshal.rst:28 ../../c-api/marshal.rst:36
msgid ""
"This function can fail, in which case it sets the error indicator. "
"Use :c:func:`PyErr_Occurred` to check for that."
msgstr ""
"這個函式可能會失敗,這時會設定錯誤指示器。使用 :c:func:`PyErr_Occurred` 來檢"
"查是否發生錯誤。"
#: ../../c-api/marshal.rst:33
msgid ""
"Marshal a Python object, *value*, to *file*. *version* indicates the file "
"format."
msgstr ""
"將一個 Python 物件 *value* marshal 為 *file*。*version* 表示檔案的格式。"
#: ../../c-api/marshal.rst:41
msgid ""
"Return a bytes object containing the marshalled representation of *value*. "
"*version* indicates the file format."
msgstr ""
"回傳一個位元組物件,包含 *value* 的 marshal 表示。*version* 為檔案的格式。"
#: ../../c-api/marshal.rst:45
msgid "The following functions allow marshalled values to be read back in."
msgstr "以下函式允許將 marshal 過後的值讀取回來。"
#: ../../c-api/marshal.rst:50
msgid ""
"Return a C :c:expr:`long` from the data stream in a :c:expr:`FILE*` opened "
"for reading. Only a 32-bit value can be read in using this function, "
"regardless of the native size of :c:expr:`long`."
msgstr ""
"從一個為讀取而開啟的 :c:expr:`FILE*` 中的資料串流回傳一個 C :c:expr:`long`。"
"無論 :c:expr:`long` 的原生大小如何,這個函式只能讀取 32 位元的值。"
#: ../../c-api/marshal.rst:54 ../../c-api/marshal.rst:64
msgid ""
"On error, sets the appropriate exception (:exc:`EOFError`) and returns "
"``-1``."
msgstr "在錯誤發生時,會設定合適的例外(:exc:`EOFError`)並回傳 ``-1``。"
#: ../../c-api/marshal.rst:60
msgid ""
"Return a C :c:expr:`short` from the data stream in a :c:expr:`FILE*` opened "
"for reading. Only a 16-bit value can be read in using this function, "
"regardless of the native size of :c:expr:`short`."
msgstr ""
"從一個為讀取而開啟的 :c:expr:`FILE*` 中的資料串流回傳一個 C :c:expr:`short`。"
"無論 :c:expr:`short` 的原生大小如何,這個函式只能讀取 16 位元的值。"
#: ../../c-api/marshal.rst:70
msgid ""
"Return a Python object from the data stream in a :c:expr:`FILE*` opened for "
"reading."
msgstr ""
"從一個為讀取而開啟的 :c:expr:`FILE*` 中的資料串流回傳一個 Python 物件。"
#: ../../c-api/marshal.rst:73 ../../c-api/marshal.rst:87
#: ../../c-api/marshal.rst:96
msgid ""
"On error, sets the appropriate exception (:exc:`EOFError`, :exc:`ValueError` "
"or :exc:`TypeError`) and returns ``NULL``."
msgstr ""
"在錯誤發生時,會設定合適的例外(:exc:`EOFError`、:exc:`ValueError` "
"或 :exc:`TypeError`)並回傳 ``NULL``。"
#: ../../c-api/marshal.rst:79
msgid ""
"Return a Python object from the data stream in a :c:expr:`FILE*` opened for "
"reading. Unlike :c:func:`PyMarshal_ReadObjectFromFile`, this function "
"assumes that no further objects will be read from the file, allowing it to "
"aggressively load file data into memory so that the de-serialization can "
"operate from data in memory rather than reading a byte at a time from the "
"file. Only use these variant if you are certain that you won't be reading "
"anything else from the file."
msgstr ""
"從一個為讀取而開啟的 :c:expr:`FILE*` 中的資料串流回傳一個 Python 物件。"
"與 :c:func:`PyMarshal_ReadObjectFromFile` 不同,這個函式假設不會從檔案中讀取"
"其他物件,允許它積極地將檔案資料載入記憶體,以便反序列化可以從記憶體中的資料"
"操作,而不是從檔案中逐位元組讀取。只有在確定不會從檔案中讀取其他內容時,才使"
"用這個變體。"
#: ../../c-api/marshal.rst:93
msgid ""
"Return a Python object from the data stream in a byte buffer containing "
"*len* bytes pointed to by *data*."
msgstr ""
"從一個包含 *len* 位元組、被 *data* 指向的位元組緩衝區中的資料串流回傳一個 "
"Python 物件。"