This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author donut
Recipients
Date 2001-03-17.17:17:34
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
gzip.open returns an object that emulates a file type.  However, it does
not support seeking or telling.  That is not the problem, what is the
problem is that even though it does not support them, it has the methods
there anyway.  This means user code can not easily do a try: ... except:
AttributeError, to test if the object supports these methods.  Instead
it would have to except on IOError, and have no way of knowing if it was
a real file error. (other than the kludge of examing the error string)

Therefore, I believe it would be more correct if these methods were
removed entirely, or at least replace the exception with AttributeError
instead of IOError.

Oh, and if they aren't removed, the seek method should at least accept
an arg since as it is now it will never raise its desired exception
anyway.

History
Date User Action Args
2007-08-23 13:53:35adminlinkissue409419 messages
2007-08-23 13:53:35admincreate