Primary
''file object'' ⚬|Definition|1st|20260605182851-00-⌔
Glossary — Python 3.14.2 documentation#term-file-object
file object
An object exposing a file-oriented API (with methods such as
read()orwrite()) to an underlying resource. Depending on the way it was created, a file object can mediate access to a real on-disk file or to another type of storage or communication device (for example standard input/output, in-memory buffers, sockets, pipes, etc.). File objects are also called file-like objects or streams.There are actually three categories of file objects: raw binary files, buffered binary files and text files. Their interfaces are defined in the
iomodule. The canonical way to create a file object is by using theopen()function.Printed 2026-06-28.
(echo:: @ ᯤ)
Link to original
Secondary
• • •