diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index cd819b8d06480a..95b39773857c54 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -1346,15 +1346,16 @@ are always available. They are listed here in alphabetical order. single: file object; open() built-in function .. function:: open(file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None) - +` Open *file* and return a corresponding :term:`file object`. If the file cannot be opened, an :exc:`OSError` is raised. See :ref:`tut-files` for more examples of how to use this function. *file* is a :term:`path-like object` giving the pathname (absolute or - relative to the current working directory) of the file to be opened or an - integer file descriptor of the file to be wrapped. (If a file descriptor is - given, it is closed when the returned I/O object is closed unless *closefd* + relative to the current working directory) of the file to be opened, + or an object with a ``name`` attribute, or an integer file descriptor + of the file to be wrapped. (If a file descriptor is given, + it is closed when the returned I/O object is closed unless *closefd* is set to ``False``.) *mode* is an optional string that specifies the mode in which the file is @@ -1366,7 +1367,7 @@ are always available. They are listed here in alphabetical order. *encoding* is not specified the encoding used is platform-dependent: :func:`locale.getencoding` is called to get the current locale encoding. (For reading and writing raw bytes use binary mode and leave - *encoding* unspecified.) The available modes are: + *encoding* unspecified.) The available modes are:` .. _filemodes: diff --git a/tatus b/tatus new file mode 100644 index 00000000000000..6b0511fda0e0a5 --- /dev/null +++ b/tatus @@ -0,0 +1,18 @@ +diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst +index cd819b8d06..cfa6d9620d 100644 +--- a/Doc/library/functions.rst ++++ b/Doc/library/functions.rst +@@ -1352,9 +1352,10 @@ are always available. They are listed here in alphabetical order. + :ref:`tut-files` for more examples of how to use this function. +  + *file* is a :term:`path-like object` giving the pathname (absolute or +- relative to the current working directory) of the file to be opened or an +- integer file descriptor of the file to be wrapped. (If a file descriptor is +- given, it is closed when the returned I/O object is closed unless *closefd* ++ relative to the current working directory) of the file to be opened, ++ or an object with a ``name`` attribute, or an integer file descriptor ++ of the file to be wrapped. (If a file descriptor is given,  ++ it is closed when the returned I/O object is closed unless *closefd* + is set to ``False``.) +  + *mode* is an optional string that specifies the mode in which the file is