pfreixes added the comment: One of the disadvantages with the Exception is that you are relying on how the events are being succeeded, and this is something that you can't predict. With just a different delay between the data and the RST packet and you might get the data in two different ways, either via a regular read or via one adhoc Exception.
This might be confusing for the developer and will end up with the second thing that IMHO is also important, the code that has to be produced by the developer gets complicated. On Wed, Jul 5, 2017 at 11:29 PM, Yury Selivanov <rep...@bugs.python.org> wrote: > > Yury Selivanov added the comment: > >> But IMHO the example it's just that an example, if the connection at > some point was not broken/closed/... and some data came into the > buffer, this data should be put available for the user. > > In my experience, you never want to recover any data from broken connections. > In cases where it's safe, StreamReader attaches the buffered data to the > exception (see IncompleteReadError). > > ---------- > > _______________________________________ > Python tracker <rep...@bugs.python.org> > <http://bugs.python.org/issue30861> > _______________________________________ ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30861> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com