File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -1494,6 +1494,12 @@ are always available. They are listed here in alphabetical order.
14941494 disabled, the raw stream, a subclass of :class: `io.RawIOBase `,
14951495 :class: `io.FileIO `, is returned.
14961496
1497+ The *file * argument is saved as the :attr: `~io.IOBase.name ` attribute of
1498+ the returned file object. If *file * is given as a string or bytes object,
1499+ it will be saved as-is. If it is given as an integer file descriptor,
1500+ the :attr: `~io.IOBase.name ` attribute will contain the file descriptor value.
1501+ For other object types, the representation of the object will be stored.
1502+
14971503 .. index ::
14981504 single: line-buffered I/O
14991505 single: unbuffered I/O
@@ -1540,6 +1546,10 @@ are always available. They are listed here in alphabetical order.
15401546 .. versionchanged :: 3.11
15411547 The ``'U' `` mode has been removed.
15421548
1549+ .. versionchanged :: 3.13
1550+ Clarified that the *file * argument is saved as the :attr: `~io.IOBase.name `
1551+ attribute.
1552+
15431553.. function :: ord(character, /)
15441554
15451555 Return the ordinal value of a character.
You can’t perform that action at this time.
0 commit comments