Kaydet (Commit) 8171cf52 authored tarafından Ezio Melotti's avatar Ezio Melotti

#12642: fix args names in open() doc.

üst 7d7702b5
...@@ -796,7 +796,7 @@ available. They are listed here in alphabetical order. ...@@ -796,7 +796,7 @@ available. They are listed here in alphabetical order.
Formerly only returned an unsigned literal. Formerly only returned an unsigned literal.
.. function:: open(filename[, mode[, bufsize]]) .. function:: open(name[, mode[, buffering]])
Open a file, returning an object of the :class:`file` type described in Open a file, returning an object of the :class:`file` type described in
section :ref:`bltin-file-objects`. If the file cannot be opened, section :ref:`bltin-file-objects`. If the file cannot be opened,
...@@ -804,7 +804,7 @@ available. They are listed here in alphabetical order. ...@@ -804,7 +804,7 @@ available. They are listed here in alphabetical order.
:func:`open` instead of invoking the :class:`file` constructor directly. :func:`open` instead of invoking the :class:`file` constructor directly.
The first two arguments are the same as for ``stdio``'s :cfunc:`fopen`: The first two arguments are the same as for ``stdio``'s :cfunc:`fopen`:
*filename* is the file name to be opened, and *mode* is a string indicating how *name* is the file name to be opened, and *mode* is a string indicating how
the file is to be opened. the file is to be opened.
The most commonly-used values of *mode* are ``'r'`` for reading, ``'w'`` for The most commonly-used values of *mode* are ``'r'`` for reading, ``'w'`` for
...@@ -825,9 +825,9 @@ available. They are listed here in alphabetical order. ...@@ -825,9 +825,9 @@ available. They are listed here in alphabetical order.
single: buffer size, I/O single: buffer size, I/O
single: I/O control; buffering single: I/O control; buffering
The optional *bufsize* argument specifies the file's desired buffer size: 0 The optional *buffering* argument specifies the file's desired buffer size: 0
means unbuffered, 1 means line buffered, any other positive value means use a means unbuffered, 1 means line buffered, any other positive value means use a
buffer of (approximately) that size. A negative *bufsize* means to use the buffer of (approximately) that size. A negative *buffering* means to use the
system default, which is usually line buffered for tty devices and fully system default, which is usually line buffered for tty devices and fully
buffered for other files. If omitted, the system default is used. [#]_ buffered for other files. If omitted, the system default is used. [#]_
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment