Description
On this page https://docs.python.org/3.10/library/functions.html#open the signature of the function is shown as:
open(file, mode='r', buffering=- 1, encoding=None, errors=None, newline=None, closefd=True, opener=None)
Notice the spurious space between the -
and the 1
.
But more importantly, the explanation of buffering
s meaning is:
buffering is an optional integer used to set the buffering policy. Pass 0 to switch buffering off (only allowed in binary mode), 1 to select line buffering (only usable in text mode), and an integer > 1 to indicate the size in bytes of a fixed-size chunk buffer.
In other words, it does not explain what the -1
default means. I assume it means "use the default buffering size for the given mode"; but it really ought to say.