Message262836
| Author |
martin.panter |
| Recipients |
Jonathan Kamens, Paolo Veglia, jmadden, marcjofre, martin.panter, pje |
| Date |
2016年04月03日.23:56:52 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1459727812.61.0.474159523345.issue24291@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
My worry was that it is easy to make a write() method that does not return anything, but is still useful in most cases. Since BufferedIOBase.write() has to guarantee to write everything, it may not seem important to return a value. But we could explicitly check for None as you suggested.
In the BaseHandler class, each chunk yielded by the application is passed to BaseHandler.write(). But that method calls self._flush(), which should avoid any buffering problem. SimpleHandler._flush() implements this by calling self.stdout.flush(). |
|