New submission from Lucio Ricardo Montero Valenzuela:

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.

----------
assignee: docs@python
components: Documentation
messages: 289411
nosy: Lucio Ricardo Montero Valenzuela, docs@python
priority: normal
severity: normal
status: open
title: print documentation: flush is also a keyword argument
type: enhancement
versions: Python 3.6

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

Reply via email to