Re: Addition to fileobject

Guido.van.Rossum@cwi.nl
Wed, 16 Mar 1994 09:10:35 +0100

> > 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>