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.

classification
Title: print documentation: flush is also a keyword argument
Type: behavior Stage: resolved
Components: Documentation Versions: Python 3.7, Python 3.6, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Lucio Ricardo Montero Valenzuela, berker.peksag, docs@python
Priority: normal Keywords:

Created on 2017-03-10 21:06 by Lucio Ricardo Montero Valenzuela, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 1093 merged berker.peksag, 2017-04-12 13:59
PR 1111 merged berker.peksag, 2017-04-13 12:51
PR 1112 merged berker.peksag, 2017-04-13 12:54
Messages (5)
msg289411 - (view) Author: Lucio Ricardo Montero Valenzuela (Lucio Ricardo Montero Valenzuela) Date: 2017-03-10 21:06
In the print() function documentation (https://docs.python.org/3/library/functions.html#print), the first line says "Print objects to the text stream file, separated by sep and followed by end. sep, end and file, if present, must be given as keyword arguments.", but the function definition is said to be "print(*objects, sep=' ', end='\n', file=sys.stdout, flush=False)". Based on the Python user function definition grammar, the only way of passing an value to a non-star parameters that appear after a star-parameter is with the keyword (so the interpreter knows not to push the value into the star-parameter list/mapping). So the flush parameter can be set only naming explicitly the keyword 'flush' ¿Isn't it?. So the first line of the print() function documentation should say "Print objects to the text stream file, separated by sep and followed by end. sep, end, file and flush, if present, must be given as keyword arguments.". Flush is a new parameter, so maybe you forgot to update this line of the documentation to include it.
Best regards.
msg291608 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2017-04-13 12:48
New changeset 61b9ac93712df8092a25223cd56fa6528359792b by Berker Peksag in branch 'master':
bpo-29791: Clarify that flush is keyword-only argument (#1093)
https://github.com/python/cpython/commit/61b9ac93712df8092a25223cd56fa6528359792b
msg291612 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2017-04-13 13:16
New changeset df9783720e40773e7854d2f4e4cfc93f0a2c08b8 by Berker Peksag in branch '3.5':
bpo-29791: Clarify that flush is keyword-only argument (GH-1093)
https://github.com/python/cpython/commit/df9783720e40773e7854d2f4e4cfc93f0a2c08b8
msg291613 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2017-04-13 13:17
New changeset 119d94ad37a99ecb0b8329467d04cd9d909e310e by Berker Peksag in branch '3.6':
bpo-29791: Clarify that flush is keyword-only argument (GH-1093)
https://github.com/python/cpython/commit/119d94ad37a99ecb0b8329467d04cd9d909e310e
msg291614 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2017-04-13 13:17
Thanks for the report!
History
Date User Action Args
2022-04-11 14:58:44adminsetgithub: 73977
2017-04-13 13:17:49berker.peksagsetstatus: open -> closed
resolution: fixed
messages: + msg291614

stage: patch review -> resolved
2017-04-13 13:17:03berker.peksagsetmessages: + msg291613
2017-04-13 13:16:32berker.peksagsetmessages: + msg291612
2017-04-13 12:54:48berker.peksagsetpull_requests: + pull_request1253
2017-04-13 12:51:59berker.peksagsetpull_requests: + pull_request1252
2017-04-13 12:48:20berker.peksagsetmessages: + msg291608
2017-04-12 13:59:58berker.peksagsetnosy: + berker.peksag
stage: patch review
type: enhancement -> behavior

versions: + Python 3.5, Python 3.7
2017-04-12 13:59:26berker.peksagsetpull_requests: + pull_request1235
2017-03-10 21:06:33Lucio Ricardo Montero Valenzuelacreate