python file API
zipher
dreamingforward at gmail.com
Mon Sep 24 18:36:20 EDT 2012
You raise a valid point: that by abstracting the file pointer into a position attribute you risk "de-coupling" the conceptual link between the underlying file and your abstraction in the python interpreter, but I think the programmer can take responsibility for maintaining the abstraction.
The key possible fault will be whether you can trap (OS-level) exceptions when assigning to the pos attribute beyond the bounds of the actual file on the system...
markj
More information about the Python-list
mailing list