File tree 5 files changed +11
-10
lines changed
5 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -56,8 +56,8 @@ connection requests.
56
56
have only one method, :meth: `more `, which should return data to be
57
57
transmitted on the channel.
58
58
The producer indicates exhaustion (*i.e. * that it contains no more data) by
59
- having its :meth: `more ` method return the empty string . At this point the
60
- :class: `async_chat ` object removes the producer from the fifo and starts
59
+ having its :meth: `more ` method return the empty bytes object . At this point
60
+ the :class: `async_chat ` object removes the producer from the fifo and starts
61
61
using the next producer, if any. When the producer fifo is empty the
62
62
:meth: `handle_write ` method does nothing. You use the channel object's
63
63
:meth: `set_terminator ` method to describe how to recognize the end of, or
@@ -221,7 +221,7 @@ any extraneous data sent by the web client are ignored. ::
221
221
def found_terminator(self):
222
222
if self.reading_headers:
223
223
self.reading_headers = False
224
- self.parse_headers("".join(self.ibuffer))
224
+ self.parse_headers(b "".join(self.ibuffer))
225
225
self.ibuffer = []
226
226
if self.op.upper() == b"POST":
227
227
clen = self.headers.getheader("content-length")
Original file line number Diff line number Diff line change @@ -208,7 +208,8 @@ any that have been added to the map during asynchronous service) is closed.
208
208
.. method :: recv(buffer_size)
209
209
210
210
Read at most *buffer_size * bytes from the socket's remote end-point. An
211
- empty string implies that the channel has been closed from the other end.
211
+ empty bytes object implies that the channel has been closed from the
212
+ other end.
212
213
213
214
214
215
.. method :: listen(backlog)
Original file line number Diff line number Diff line change @@ -113,15 +113,15 @@ instance will fail with a :exc:`EOFError` exception.
113
113
114
114
Read at most *size * bytes from the chunk (less if the read hits the end of
115
115
the chunk before obtaining *size * bytes). If the *size * argument is
116
- negative or omitted, read all data until the end of the chunk. The bytes
117
- are returned as a string object. An empty string is returned when the end
118
- of the chunk is encountered immediately.
116
+ negative or omitted, read all data until the end of the chunk. An empty
117
+ bytes object is returned when the end of the chunk is encountered
118
+ immediately.
119
119
120
120
121
121
.. method :: skip()
122
122
123
123
Skip to the end of the chunk. All further calls to :meth: `read ` for the
124
- chunk will return ``'' ``. If you are not interested in the contents of
124
+ chunk will return ``b '' ``. If you are not interested in the contents of
125
125
the chunk, this method should be called so that the file points to the
126
126
start of the next chunk.
127
127
Original file line number Diff line number Diff line change @@ -457,7 +457,7 @@ Functions
457
457
is either ``"xml" ``, ``"html" `` or ``"text" `` (default is ``"xml" ``).
458
458
Returns a list of (optionally) encoded strings containing the XML data.
459
459
It does not guarantee any specific sequence, except that
460
- ``"".join(tostringlist(element)) == tostring(element) ``.
460
+ ``b "".join(tostringlist(element)) == tostring(element) ``.
461
461
462
462
.. versionadded :: 3.2
463
463
Original file line number Diff line number Diff line change @@ -197,7 +197,7 @@ Decompression objects support the following methods and attributes:
197
197
.. attribute :: Decompress.unused_data
198
198
199
199
A bytes object which contains any bytes past the end of the compressed data. That is,
200
- this remains ``"" `` until the last byte that contains compression data is
200
+ this remains ``b "" `` until the last byte that contains compression data is
201
201
available. If the whole bytestring turned out to contain compressed data, this is
202
202
``b"" ``, an empty bytes object.
203
203
You can’t perform that action at this time.
0 commit comments