Kaydet (Commit) b7f19ff9 authored tarafından Victor Stinner's avatar Victor Stinner

asyncio: document the IncompleteReadError exception

üst 9a2e75be
......@@ -98,7 +98,10 @@ StreamReader
.. 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>`.
......@@ -208,6 +211,22 @@ StreamReaderProtocol
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
=======
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment