Kaydet (Commit) e40ee509 authored tarafından Georg Brandl's avatar Georg Brandl

#9184: fix default value for "buffering" param of open().

üst de41bf3d
...@@ -676,7 +676,7 @@ are always available. They are listed here in alphabetical order. ...@@ -676,7 +676,7 @@ are always available. They are listed here in alphabetical order.
:meth:`__index__` method that returns an integer. :meth:`__index__` method that returns an integer.
.. function:: open(file, mode='r', buffering=None, encoding=None, errors=None, newline=None, closefd=True) .. function:: open(file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True)
Open *file* and return a corresponding stream. If the file cannot be opened, Open *file* and return a corresponding stream. If the file cannot be opened,
an :exc:`IOError` is raised. an :exc:`IOError` is raised.
......
...@@ -176,7 +176,7 @@ PyObject *PyExc_BlockingIOError = (PyObject *)&_PyExc_BlockingIOError; ...@@ -176,7 +176,7 @@ PyObject *PyExc_BlockingIOError = (PyObject *)&_PyExc_BlockingIOError;
* The main open() function * The main open() function
*/ */
PyDoc_STRVAR(open_doc, PyDoc_STRVAR(open_doc,
"open(file, mode='r', buffering=None, encoding=None,\n" "open(file, mode='r', buffering=-1, encoding=None,\n"
" errors=None, newline=None, closefd=True) -> file object\n" " errors=None, newline=None, closefd=True) -> file object\n"
"\n" "\n"
"Open file and return a stream. Raise IOError upon failure.\n" "Open file and return a stream. Raise IOError upon failure.\n"
......
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