A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2014-January/132132.html below:

[Python-Dev] News from asyncio

[Python-Dev] News from asyncio [Python-Dev] News from asyncioVictor Stinner victor.stinner at gmail.com
Mon Jan 27 12:20:36 CET 2014
2014-01-27 Gustavo Carneiro <gjcarneiro at gmail.com>:
>> > Why not simply EOFError?
>>
>> IncompleteReadError has two additionnal attributes:
>>
>> - partial: "incomplete" received bytes
>> - expected: total number of expected bytes (n parameter of readexactly)
>>
>> I prefer to use a different exception to ensure that these attributes
>> are present. I don't like having to check "hasattr(exc, ...)".
>>
>> Before this change, readexactly(n) returned the partial received bytes
>> if the end of the stream was reached.
>
> I had the same doubt.  Note also that IncompleteReadError is a subclass of
> EOFError, so you can catch EOFError if you like.

Oops, I forgot to mention that :-) I just documented the new
IncompleteReadError in asyncio doc.

Victor
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4