New submission from akira:

The current code example contains [1]:

    print("Python failed with exit code %s:" % exitcode)
    sys.stdout.flush()
    sys.stdout.buffer.flush()
    sys.stdout.buffer.write(stdout)
    sys.stdout.buffer.flush()

that looks bizarre.

Either a comment should be added that explains why the `.flush()` calls
are necessary or they should be removed.

I've attached the documentation patch that removes the calls.

[1] 
http://hg.python.org/cpython/file/2af5a52b9b87/Doc/library/asyncio-subprocess.rst#l227

----------
assignee: docs@python
components: Documentation
files: docs-subprocess-remove-unnecessary-flush-from-code-example.patch
keywords: patch
messages: 218342
nosy: akira, docs@python
priority: normal
severity: normal
status: open
title: remove unnecesary .flush() calls in the asyncio subprocess code example
versions: Python 3.4, Python 3.5
Added file: 
http://bugs.python.org/file35230/docs-subprocess-remove-unnecessary-flush-from-code-example.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21485>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to