]> granicus.if.org Git - python/commitdiff
#9184: fix default value for "buffering" param of open().
authorGeorg Brandl <georg@python.org>
Sun, 11 Jul 2010 09:33:39 +0000 (09:33 +0000)
committerGeorg Brandl <georg@python.org>
Sun, 11 Jul 2010 09:33:39 +0000 (09:33 +0000)
Doc/library/functions.rst
Modules/_io/_iomodule.c

index a7a9e47484e82464edc5abd70cd0f8f3a73b09fa..8089df15a23c6112c69858dd32026af01f33601a 100644 (file)
@@ -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.
index e20a2f6e44b005c181e1748c3c2b6e2aad6d7451..733a7b95d7252e1ea31dac54465eab57baf2d273 100644 (file)
@@ -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"