mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
This completes PEP 519.
This commit is contained in:
parent
ec6ce879c7
commit
6fa7aada9b
3 changed files with 233 additions and 22 deletions
|
@ -878,11 +878,11 @@ are always available. They are listed here in alphabetical order.
|
|||
Open *file* and return a corresponding :term:`file object`. If the file
|
||||
cannot be opened, an :exc:`OSError` is raised.
|
||||
|
||||
*file* is either a string, bytes, or :class:`os.PathLike` 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* is set to ``False``.)
|
||||
*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*
|
||||
is set to ``False``.)
|
||||
|
||||
*mode* is an optional string that specifies the mode in which the file is
|
||||
opened. It defaults to ``'r'`` which means open for reading in text mode.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue