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>