9.4. File Built-in AttributesFile objects also have data attributes in addition to methods. These attributes hold auxiliary data related to the file object they belong to, such as the file name (file.name), the mode with which the file was opened (file.mode), whether the file is closed (file.closed), and a flag indicating whether an additional space character needs to be displayed before successive data items when using the print statement (file.softspace). Table 9.4 lists these attributes along with a brief description of each.
|