From: Georg Brandl Date: Sun, 11 Jul 2010 09:33:39 +0000 (+0000) Subject: #9184: fix default value for "buffering" param of open(). X-Git-Tag: v3.2a1~228 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e40ee509e35edd7dcab4009c4a65efc626527bb8;p=python #9184: fix default value for "buffering" param of open(). --- diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index a7a9e47484..8089df15a2 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -676,7 +676,7 @@ are always available. They are listed here in alphabetical order. :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, an :exc:`IOError` is raised. diff --git a/Modules/_io/_iomodule.c b/Modules/_io/_iomodule.c index e20a2f6e44..733a7b95d7 100644 --- a/Modules/_io/_iomodule.c +++ b/Modules/_io/_iomodule.c @@ -176,7 +176,7 @@ PyObject *PyExc_BlockingIOError = (PyObject *)&_PyExc_BlockingIOError; * The main open() function */ 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" "\n" "Open file and return a stream. Raise IOError upon failure.\n"