This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author oconnor663
Recipients gvanrossum, oconnor663, vstinner, yselivanov
Date 2014-08-27.17:22:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1409160168.15.0.236526513358.issue22279@psf.upfronthosting.co.za>
In-reply-to
Content
Agreed that changing read() would probably break tons of people. I don't think a naming inconsistency meets the "serious flaws are uncovered" bar for breaking a provisional package. If we actually prefer the asyncio way of doing things, all the better.

That said, another thing I'm noticing is that in asyncio, read is basically two different functions. This is clear in the code, http://hg.python.org/cpython/file/fb3aee1cff59/Lib/asyncio/streams.py#l433, where the n<0 case goes off on its own branch and never comes back. (Incidentally there's another n<0 check at line 453 there that I think always returns false.) We have a read function that makes very different guarantees depending on the value of n. Contrast this with the read function from regular io, where read(n) and read() are effectively the same if n is large enough. Maybe just another point that's worth clarifying in the docs.

Thanks for the quick replies!
History
Date User Action Args
2014-08-27 17:22:48oconnor663setrecipients: + oconnor663, gvanrossum, vstinner, yselivanov
2014-08-27 17:22:48oconnor663setmessageid: <1409160168.15.0.236526513358.issue22279@psf.upfronthosting.co.za>
2014-08-27 17:22:48oconnor663linkissue22279 messages
2014-08-27 17:22:48oconnor663create