From e40ee509e35edd7dcab4009c4a65efc626527bb8 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 11 Jul 2010 09:33:39 +0000 Subject: #9184: fix default value for "buffering" param of open(). --- Doc/library/functions.rst | 2 +- Modules/_io/_iomodule.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index a7a9e47..8089df1 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 e20a2f6..733a7b9 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" -- cgit v0.12