File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -56,8 +56,8 @@ connection requests.
5656 have only one method, :meth: `more `, which should return data to be
5757 transmitted on the channel.
5858 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
6161 using the next producer, if any. When the producer fifo is empty the
6262 :meth: `handle_write ` method does nothing. You use the channel object's
6363 :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. ::
221221 def found_terminator(self):
222222 if self.reading_headers:
223223 self.reading_headers = False
224- self.parse_headers("".join(self.ibuffer))
224+ self.parse_headers(b "".join(self.ibuffer))
225225 self.ibuffer = []
226226 if self.op.upper() == b"POST":
227227 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.
208208 .. method :: recv(buffer_size)
209209
210210 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.
212213
213214
214215 .. 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.
113113
114114 Read at most *size * bytes from the chunk (less if the read hits the end of
115115 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.
119119
120120
121121 .. method :: skip()
122122
123123 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
125125 the chunk, this method should be called so that the file points to the
126126 start of the next chunk.
127127
Original file line number Diff line number Diff line change @@ -457,7 +457,7 @@ Functions
457457 is either ``"xml" ``, ``"html" `` or ``"text" `` (default is ``"xml" ``).
458458 Returns a list of (optionally) encoded strings containing the XML data.
459459 It does not guarantee any specific sequence, except that
460- ``"".join(tostringlist(element)) == tostring(element) ``.
460+ ``b "".join(tostringlist(element)) == tostring(element) ``.
461461
462462 .. versionadded :: 3.2
463463
Original file line number Diff line number Diff line change @@ -197,7 +197,7 @@ Decompression objects support the following methods and attributes:
197197.. attribute :: Decompress.unused_data
198198
199199 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
201201 available. If the whole bytestring turned out to contain compressed data, this is
202202 ``b"" ``, an empty bytes object.
203203
You can’t perform that action at this time.
0 commit comments