Re: Addition to fileobject
Adrian Phillips (tandem@freeze.oslo.dnmi.no)
Wed, 16 Mar 1994 09:13:02 +0000
On Mar 16, 9:10am, Guido.van.Rossum@cwi.nl wrote:
> Subject: Re: Addition to fileobject
> > > Otherwise it looks fine to me. (Could there be a problem that stdio
> > > does not want you to call setbuf when you've already done I/O?)
> >
> > Yes, but this is the same for C programs.
>
> If you violate the rules in C and you get a core dump, tough luck.
> But if you violate the rules in Python, you should get an exception --
> not a core file from the interpreter!
>
> Now *if* setbuf() might dump core under certain circumstances, I would
> have to find out what those circumstances were and test for them
> before calling setbuf(), to avoid a Python core dump (and raise an
> exception instead).
>
> --Guido van Rossum, CWI, Amsterdam <Guido.van.Rossum@cwi.nl>
> URL: <http://www.cwi.nl/cwi/people/Guido.van.Rossum.html>
>-- End of excerpt from Guido.van.Rossum@cwi.nl
Just add a flag to the open and be done with it.
Adrian
--
---------------------
========================================================================
= =
= Adrian Phillips at The Norwegian Meteorological Institute =
= =
= BUT any thoughts in this are purely my own and have nothing to do with =
= this establishment, thankfully. =
= =
= Internet: daap@typhoon.oslo.dnmi.no =
= Phone: 47 22 96 32 09 =
= Fax: 47 22 96 30 50 =
= =
========================================================================