Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
7f75284a
Commit
7f75284a
authored
Feb 06, 2014
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix empty strings to empty bytes objects.
parent
ef29525b
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
10 deletions
+11
-10
Doc/library/asynchat.rst
Doc/library/asynchat.rst
+3
-3
Doc/library/asyncore.rst
Doc/library/asyncore.rst
+2
-1
Doc/library/chunk.rst
Doc/library/chunk.rst
+4
-4
Doc/library/xml.etree.elementtree.rst
Doc/library/xml.etree.elementtree.rst
+1
-1
Doc/library/zlib.rst
Doc/library/zlib.rst
+1
-1
No files found.
Doc/library/asynchat.rst
View file @
7f75284a
...
@@ -56,8 +56,8 @@ connection requests.
...
@@ -56,8 +56,8 @@ connection requests.
have only one method, :meth:`more`, which should return data to be
have only one method, :meth:`more`, which should return data to be
transmitted on the channel.
transmitted on the channel.
The producer indicates exhaustion (*i.e.* that it contains no more data) by
The producer indicates exhaustion (*i.e.* that it contains no more data) by
having its :meth:`more` method return the empty
string. At this point the
having its :meth:`more` method return the empty
bytes object. At this point
:class:`async_chat` object removes the producer from the fifo and starts
the
:class:`async_chat` object removes the producer from the fifo and starts
using the next producer, if any. When the producer fifo is empty the
using the next producer, if any. When the producer fifo is empty the
:meth:`handle_write` method does nothing. You use the channel object's
:meth:`handle_write` method does nothing. You use the channel object's
:meth:`set_terminator` method to describe how to recognize the end of, or
: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,7 +221,7 @@ any extraneous data sent by the web client are ignored. ::
def found_terminator(self):
def found_terminator(self):
if self.reading_headers:
if self.reading_headers:
self.reading_headers = False
self.reading_headers = False
self.parse_headers("".join(self.ibuffer))
self.parse_headers(
b
"".join(self.ibuffer))
self.ibuffer = []
self.ibuffer = []
if self.op.upper() == b"POST":
if self.op.upper() == b"POST":
clen = self.headers.getheader("content-length")
clen = self.headers.getheader("content-length")
...
...
Doc/library/asyncore.rst
View file @
7f75284a
...
@@ -208,7 +208,8 @@ any that have been added to the map during asynchronous service) is closed.
...
@@ -208,7 +208,8 @@ any that have been added to the map during asynchronous service) is closed.
.. method:: recv(buffer_size)
.. method:: recv(buffer_size)
Read at most *buffer_size* bytes from the socket's remote end-point. An
Read at most *buffer_size* bytes from the socket's remote end-point. An
empty string implies that the channel has been closed from the other end.
empty bytes object implies that the channel has been closed from the
other end.
.. method:: listen(backlog)
.. method:: listen(backlog)
...
...
Doc/library/chunk.rst
View file @
7f75284a
...
@@ -113,15 +113,15 @@ instance will fail with a :exc:`EOFError` exception.
...
@@ -113,15 +113,15 @@ instance will fail with a :exc:`EOFError` exception.
Read at most *size* bytes from the chunk (less if the read hits the end of
Read at most *size* bytes from the chunk (less if the read hits the end of
the chunk before obtaining *size* bytes). If the *size* argument is
the chunk before obtaining *size* bytes). If the *size* argument is
negative or omitted, read all data until the end of the chunk.
The bytes
negative or omitted, read all data until the end of the chunk.
An empty
are returned as a string object. An empty string is returned when the en
d
bytes object is returned when the end of the chunk is encountere
d
of the chunk is encountered
immediately.
immediately.
.. method:: skip()
.. method:: skip()
Skip to the end of the chunk. All further calls to :meth:`read` for the
Skip to the end of the chunk. All further calls to :meth:`read` for the
chunk will return ``''``. If you are not interested in the contents of
chunk will return ``
b
''``. If you are not interested in the contents of
the chunk, this method should be called so that the file points to the
the chunk, this method should be called so that the file points to the
start of the next chunk.
start of the next chunk.
...
...
Doc/library/xml.etree.elementtree.rst
View file @
7f75284a
...
@@ -457,7 +457,7 @@ Functions
...
@@ -457,7 +457,7 @@ Functions
is either ``"xml"``, ``"html"`` or ``"text"`` (default is ``"xml"``).
is either ``"xml"``, ``"html"`` or ``"text"`` (default is ``"xml"``).
Returns a list of (optionally) encoded strings containing the XML data.
Returns a list of (optionally) encoded strings containing the XML data.
It does not guarantee any specific sequence, except that
It does not guarantee any specific sequence, except that
``"".join(tostringlist(element)) == tostring(element)``.
``
b
"".join(tostringlist(element)) == tostring(element)``.
.. versionadded:: 3.2
.. versionadded:: 3.2
...
...
Doc/library/zlib.rst
View file @
7f75284a
...
@@ -197,7 +197,7 @@ Decompression objects support the following methods and attributes:
...
@@ -197,7 +197,7 @@ Decompression objects support the following methods and attributes:
.. attribute:: Decompress.unused_data
.. attribute:: Decompress.unused_data
A bytes object which contains any bytes past the end of the compressed data. That is,
A bytes object which contains any bytes past the end of the compressed data. That is,
this remains ``""`` until the last byte that contains compression data is
this remains ``
b
""`` until the last byte that contains compression data is
available. If the whole bytestring turned out to contain compressed data, this is
available. If the whole bytestring turned out to contain compressed data, this is
``b""``, an empty bytes object.
``b""``, an empty bytes object.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment