[issue12020] Attribute error with flush on stdout,stderr

Brandon Milam added the comment: I've been looking over the issue and the error is just raised by the stdout change not the stderr change (when the stdout line is commented out in the setAutoFlush function no error is raised). The flush method doesn't seem to be required as Serhiy pointed out since the script still is able to run. This is the cause for the error, however and I think that the required subset of methods for stdout objects to avoid errors could be clarified in the documentation. This documentation addition I think would be best under the sys.stdout info rather than under io.TextIOBase since the error can be raised without going through this class at all like in the original post. I would like to add this documentation under sys.stdout as required subset of methods that must be defined and was wondering if there were any other methods than flush() that would need to be defined. ---------- nosy: +jbmilam _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue12020> _______________________________________
participants (1)
-
Brandon Milam