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 gvanrossum
Recipients gvanrossum, pfalcon, vstinner, yselivanov
Date 2015-06-14.18:47:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Most people actually are better off with just write(), and an API with more choices is not necessarily better. I'm sure this has come up before, I could've sworn it was you, sorry if it wasn't.

Here's one reason why I don't like your proposed API. The read() and write() calls *aren't* symmetric: When you call read(), you are interested in the return value. If you forget the "yield from" (or 'async') your use of the return value will most likely raise an exception immediately, so you will notice (and pinpoint) the bug in your code instantly. But with write() there is no natural return value, so if write() was a coroutine, the common mistake (amongst beginners) of forgetting the "yield from" or 'async' would be much harder to debug -- your program happily proceeds, but now it's likely hung, waiting for a response that it won't get (because the other side didn't get what you meant to write) or perhaps you get a cryptic error (because the other side saw the thing you wrote next).
Date User Action Args
2015-06-14 18:47:42gvanrossumsetrecipients: + gvanrossum, pfalcon, vstinner, yselivanov
2015-06-14 18:47:42gvanrossumsetmessageid: <>
2015-06-14 18:47:42gvanrossumlinkissue24449 messages
2015-06-14 18:47:42gvanrossumcreate