7
7
msgstr ""
8
8
"Project-Id-Version : Python 3.10\n "
9
9
"Report-Msgid-Bugs-To : \n "
10
- "POT-Creation-Date : 2018-06-26 18:54+0800 \n "
10
+ "POT-Creation-Date : 2022-03-21 00:13+0000 \n "
11
11
"PO-Revision-Date : 2018-05-23 14:38+0000\n "
12
12
"Last-Translator : Adrian Liaw <adrianliaw2000@gmail.com>\n "
13
13
"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
@@ -22,21 +22,23 @@ msgstr ""
22
22
msgid ":mod:`asynchat` --- Asynchronous socket command/response handler"
23
23
msgstr ""
24
24
25
- #: ../../library/asynchat.rst:10
25
+ #: ../../library/asynchat.rst:11
26
26
msgid "**Source code:** :source:`Lib/asynchat.py`"
27
27
msgstr "**原始碼:**\\ :source:`Lib/asynchat.py`"
28
28
29
- #: ../../library/asynchat.rst:12
30
- msgid "Please use :mod:`asyncio` instead."
29
+ #: ../../library/asynchat.rst:13
30
+ msgid ""
31
+ ":mod:`asynchat` will be removed in Python 3.12 (:pep:`594`). Please use :mod:"
32
+ "`asyncio` instead."
31
33
msgstr ""
32
34
33
- #: ../../library/asynchat.rst:19
35
+ #: ../../library/asynchat.rst:21
34
36
msgid ""
35
37
"This module exists for backwards compatibility only. For new code we "
36
38
"recommend using :mod:`asyncio`."
37
39
msgstr ""
38
40
39
- #: ../../library/asynchat.rst:22
41
+ #: ../../library/asynchat.rst:24
40
42
msgid ""
41
43
"This module builds on the :mod:`asyncore` infrastructure, simplifying "
42
44
"asynchronous clients and servers and making it easier to handle protocols "
@@ -51,7 +53,7 @@ msgid ""
51
53
"connection requests."
52
54
msgstr ""
53
55
54
- #: ../../library/asynchat.rst:37
56
+ #: ../../library/asynchat.rst:39
55
57
msgid ""
56
58
"This class is an abstract subclass of :class:`asyncore.dispatcher`. To make "
57
59
"practical use of the code you must subclass :class:`async_chat`, providing "
@@ -60,7 +62,7 @@ msgid ""
60
62
"all make sense in a message/response context."
61
63
msgstr ""
62
64
63
- #: ../../library/asynchat.rst:44
65
+ #: ../../library/asynchat.rst:46
64
66
msgid ""
65
67
"Like :class:`asyncore.dispatcher`, :class:`async_chat` defines a set of "
66
68
"events that are generated by an analysis of socket conditions after a :c:"
@@ -69,21 +71,21 @@ msgid ""
69
71
"with no action on the part of the programmer."
70
72
msgstr ""
71
73
72
- #: ../../library/asynchat.rst:50
74
+ #: ../../library/asynchat.rst:52
73
75
msgid ""
74
76
"Two class attributes can be modified, to improve performance, or possibly "
75
77
"even to conserve memory."
76
78
msgstr ""
77
79
78
- #: ../../library/asynchat.rst:56
80
+ #: ../../library/asynchat.rst:58
79
81
msgid "The asynchronous input buffer size (default ``4096``)."
80
82
msgstr ""
81
83
82
- #: ../../library/asynchat.rst:61
84
+ #: ../../library/asynchat.rst:63
83
85
msgid "The asynchronous output buffer size (default ``4096``)."
84
86
msgstr ""
85
87
86
- #: ../../library/asynchat.rst:63
88
+ #: ../../library/asynchat.rst:65
87
89
msgid ""
88
90
"Unlike :class:`asyncore.dispatcher`, :class:`async_chat` allows you to "
89
91
"define a :abbr:`FIFO (first-in, first-out)` queue of *producers*. A producer "
@@ -98,115 +100,115 @@ msgid ""
98
100
"transmission from the remote endpoint."
99
101
msgstr ""
100
102
101
- #: ../../library/asynchat.rst:76
103
+ #: ../../library/asynchat.rst:78
102
104
msgid ""
103
105
"To build a functioning :class:`async_chat` subclass your input methods :"
104
106
"meth:`collect_incoming_data` and :meth:`found_terminator` must handle the "
105
107
"data that the channel receives asynchronously. The methods are described "
106
108
"below."
107
109
msgstr ""
108
110
109
- #: ../../library/asynchat.rst:84
111
+ #: ../../library/asynchat.rst:86
110
112
msgid ""
111
113
"Pushes a ``None`` on to the producer queue. When this producer is popped off "
112
114
"the queue it causes the channel to be closed."
113
115
msgstr ""
114
116
115
- #: ../../library/asynchat.rst:90
117
+ #: ../../library/asynchat.rst:92
116
118
msgid ""
117
119
"Called with *data* holding an arbitrary amount of received data. The "
118
120
"default method, which must be overridden, raises a :exc:"
119
121
"`NotImplementedError` exception."
120
122
msgstr ""
121
123
122
- #: ../../library/asynchat.rst:97
124
+ #: ../../library/asynchat.rst:99
123
125
msgid ""
124
126
"In emergencies this method will discard any data held in the input and/or "
125
127
"output buffers and the producer queue."
126
128
msgstr ""
127
129
128
- #: ../../library/asynchat.rst:103
130
+ #: ../../library/asynchat.rst:105
129
131
msgid ""
130
132
"Called when the incoming data stream matches the termination condition set "
131
133
"by :meth:`set_terminator`. The default method, which must be overridden, "
132
134
"raises a :exc:`NotImplementedError` exception. The buffered input data "
133
135
"should be available via an instance attribute."
134
136
msgstr ""
135
137
136
- #: ../../library/asynchat.rst:111
138
+ #: ../../library/asynchat.rst:113
137
139
msgid "Returns the current terminator for the channel."
138
140
msgstr ""
139
141
140
- #: ../../library/asynchat.rst:116
142
+ #: ../../library/asynchat.rst:118
141
143
msgid ""
142
144
"Pushes data on to the channel's queue to ensure its transmission. This is "
143
145
"all you need to do to have the channel write the data out to the network, "
144
146
"although it is possible to use your own producers in more complex schemes to "
145
147
"implement encryption and chunking, for example."
146
148
msgstr ""
147
149
148
- #: ../../library/asynchat.rst:124
150
+ #: ../../library/asynchat.rst:126
149
151
msgid ""
150
152
"Takes a producer object and adds it to the producer queue associated with "
151
153
"the channel. When all currently-pushed producers have been exhausted the "
152
154
"channel will consume this producer's data by calling its :meth:`more` method "
153
155
"and send the data to the remote endpoint."
154
156
msgstr ""
155
157
156
- #: ../../library/asynchat.rst:132
158
+ #: ../../library/asynchat.rst:134
157
159
msgid ""
158
160
"Sets the terminating condition to be recognized on the channel. ``term`` "
159
161
"may be any of three types of value, corresponding to three different ways to "
160
162
"handle incoming protocol data."
161
163
msgstr ""
162
164
163
- #: ../../library/asynchat.rst:137
165
+ #: ../../library/asynchat.rst:139
164
166
msgid "term"
165
167
msgstr ""
166
168
167
- #: ../../library/asynchat.rst:137
169
+ #: ../../library/asynchat.rst:139
168
170
msgid "Description"
169
171
msgstr "描述"
170
172
171
- #: ../../library/asynchat.rst:139
173
+ #: ../../library/asynchat.rst:141
172
174
msgid "*string*"
173
175
msgstr ""
174
176
175
- #: ../../library/asynchat.rst:139
177
+ #: ../../library/asynchat.rst:141
176
178
msgid ""
177
179
"Will call :meth:`found_terminator` when the string is found in the input "
178
180
"stream"
179
181
msgstr ""
180
182
181
- #: ../../library/asynchat.rst:142
183
+ #: ../../library/asynchat.rst:144
182
184
msgid "*integer*"
183
185
msgstr ""
184
186
185
- #: ../../library/asynchat.rst:142
187
+ #: ../../library/asynchat.rst:144
186
188
msgid ""
187
189
"Will call :meth:`found_terminator` when the indicated number of characters "
188
190
"have been received"
189
191
msgstr ""
190
192
191
- #: ../../library/asynchat.rst:146
193
+ #: ../../library/asynchat.rst:148
192
194
msgid "``None``"
193
195
msgstr "``None``"
194
196
195
- #: ../../library/asynchat.rst:146
197
+ #: ../../library/asynchat.rst:148
196
198
msgid "The channel continues to collect data forever"
197
199
msgstr ""
198
200
199
- #: ../../library/asynchat.rst:150
201
+ #: ../../library/asynchat.rst:152
200
202
msgid ""
201
203
"Note that any data following the terminator will be available for reading by "
202
204
"the channel after :meth:`found_terminator` is called."
203
205
msgstr ""
204
206
205
- #: ../../library/asynchat.rst:157
207
+ #: ../../library/asynchat.rst:159
206
208
msgid "asynchat Example"
207
209
msgstr ""
208
210
209
- #: ../../library/asynchat.rst:159
211
+ #: ../../library/asynchat.rst:161
210
212
msgid ""
211
213
"The following partial example shows how HTTP requests can be read with :"
212
214
"class:`async_chat`. A web server might create an :class:"
@@ -216,15 +218,15 @@ msgid ""
216
218
"read."
217
219
msgstr ""
218
220
219
- #: ../../library/asynchat.rst:166
221
+ #: ../../library/asynchat.rst:168
220
222
msgid ""
221
223
"Once the headers have been read, if the request is of type POST (indicating "
222
224
"that further data are present in the input stream) then the ``Content-Length:"
223
225
"`` header is used to set a numeric terminator to read the right amount of "
224
226
"data from the channel."
225
227
msgstr ""
226
228
227
- #: ../../library/asynchat.rst:171
229
+ #: ../../library/asynchat.rst:173
228
230
msgid ""
229
231
"The :meth:`handle_request` method is called once all relevant input has been "
230
232
"marshalled, after setting the channel terminator to ``None`` to ensure that "
0 commit comments