Python's built-in open function returns a "file-like object". These file objects can be obtained in other ways as well, and may not actually represent files.
I haven't been able to find what I want to know about these.
https://docs.python.org/3/glossary.html#term-file-object states that all file objects all have 1 thing in common: they expose "a file-oriented API". But I can't find any documentation about this api.
A file object's write method seems to return an integer, but what does it represent? Is the return value guaranteed to be an integer? What methods and properties are file objects guaranteed to have?