Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e40ee50

Browse files
committed
#9184: fix default value for "buffering" param of open().
1 parent de41bf3 commit e40ee50

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Doc/library/functions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ are always available. They are listed here in alphabetical order.
676676
:meth:`__index__` method that returns an integer.
677677

678678

679-
.. function:: open(file, mode='r', buffering=None, encoding=None, errors=None, newline=None, closefd=True)
679+
.. function:: open(file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True)
680680

681681
Open *file* and return a corresponding stream. If the file cannot be opened,
682682
an :exc:`IOError` is raised.

Modules/_io/_iomodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ PyObject *PyExc_BlockingIOError = (PyObject *)&_PyExc_BlockingIOError;
176176
* The main open() function
177177
*/
178178
PyDoc_STRVAR(open_doc,
179-
"open(file, mode='r', buffering=None, encoding=None,\n"
179+
"open(file, mode='r', buffering=-1, encoding=None,\n"
180180
" errors=None, newline=None, closefd=True) -> file object\n"
181181
"\n"
182182
"Open file and return a stream. Raise IOError upon failure.\n"

0 commit comments

Comments
 (0)