[Python-3000] iostack, continued

Greg Ewing greg.ewing at canterbury.ac.nz
Thu Jun 8 01:42:40 CEST 2006


Nick Coghlan wrote:

> With a position attribute on actual file IO objects, it should be 
> possible to set it up so that the file object only invokes tell() when 
> you try to *change* the position. When you simply access the attribute, 
> it will return the answer from an internal variable (it needs to do this 
> anyway in order to take buffering into account).

Be careful -- in Unix it's possible for different file
descriptors to share the same position pointer. For
unbuffered streams at least, this should be reflected
in the relevant properties or whatever is being used.

--
Greg


More information about the Python-3000 mailing list