mirror of
https://github.com/python/cpython.git
synced 2025-11-11 14:44:57 +00:00
asyncio: document the IncompleteReadError exception
This commit is contained in:
parent
9a2e75be24
commit
b7f19ff94b
1 changed files with 20 additions and 1 deletions
|
|
@ -98,7 +98,10 @@ StreamReader
|
||||||
|
|
||||||
.. method:: readexactly(n)
|
.. method:: readexactly(n)
|
||||||
|
|
||||||
XXX
|
Read exactly *n* bytes. Raise an :exc:`IncompleteReadError` if the end of
|
||||||
|
the stream is reached before *n* can be read, the
|
||||||
|
:attr:`IncompleteReadError.partial` attribute of the exception contains
|
||||||
|
the partial read bytes.
|
||||||
|
|
||||||
This method returns a :ref:`coroutine object <coroutine>`.
|
This method returns a :ref:`coroutine object <coroutine>`.
|
||||||
|
|
||||||
|
|
@ -208,6 +211,22 @@ StreamReaderProtocol
|
||||||
XXX
|
XXX
|
||||||
|
|
||||||
|
|
||||||
|
IncompleteReadError
|
||||||
|
===================
|
||||||
|
|
||||||
|
.. exception:: IncompleteReadError
|
||||||
|
|
||||||
|
Incomplete read error.
|
||||||
|
|
||||||
|
.. attribute:: expected
|
||||||
|
|
||||||
|
Total number of expected bytes (:class:`int`).
|
||||||
|
|
||||||
|
.. attribute:: partial
|
||||||
|
|
||||||
|
Read bytes string before the end of stream was reached (:class:`bytes`).
|
||||||
|
|
||||||
|
|
||||||
Example
|
Example
|
||||||
=======
|
=======
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue