[Python-checkins] commit of r41662 - in python/trunk: Misc/NEWS Objects/fileobject.c configure configure.in pyconfig.h.in

Neal Norwitz nnorwitz at gmail.com
Wed Dec 14 06:41:35 CET 2005


On 12/13/05, Guido van Rossum <guido at python.org> wrote:
>
> > > Or is there a real bug caused by tell() lying?
> >
> > I don't think it's harm to keep the original behavior as before this fix.
> > But file.tell() is quite cheap operation among routines likely enclose
> > the operation.  Hmm.  If isatty() for every call still looks too expensive,
> > we can just fix documentation and unittest. I'm quite neutral for the
> > problem because tty.tell() is quite non-sense. :)
>
> Unfortunately there is now code that depends on the documented
> behavior. In httplib (and perhaps other mail-header-parsing code)
> there's a flag 'seekable' that's set to True iff tell() succeeds.
> While it's unlikely that anyone would attempt to read mail from a tty
> device, I now believe that forcing the failure if isatty() is the
> right thing to do.

Sorry, I was planning on responding sooner.

Before the rest of this thread, I thought it best to remove the test
code.  I thought I heard that POSIX was ambiguous.  Since I'm the one
that started this mess, let me know if I should revert.

n


More information about the Python-checkins mailing list