Skip to content

Commit d41aa7f

Browse files
author
ssrthakkumar
committed
Doc: clarify that open() accepts objects with name attribute
1 parent 63cc125 commit d41aa7f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Doc/library/functions.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1352,9 +1352,10 @@ are always available. They are listed here in alphabetical order.
13521352
:ref:`tut-files` for more examples of how to use this function.
13531353

13541354
*file* is a :term:`path-like object` giving the pathname (absolute or
1355-
relative to the current working directory) of the file to be opened or an
1356-
integer file descriptor of the file to be wrapped. (If a file descriptor is
1357-
given, it is closed when the returned I/O object is closed unless *closefd*
1355+
relative to the current working directory) of the file to be opened,
1356+
or an object with a ``name`` attribute, or an integer file descriptor
1357+
of the file to be wrapped. (If a file descriptor is given,
1358+
it is closed when the returned I/O object is closed unless *closefd*
13581359
is set to ``False``.)
13591360

13601361
*mode* is an optional string that specifies the mode in which the file is

0 commit comments

Comments
 (0)