Rebinding stdout (was: Re: Python! Is! Truly! Amazing!)

michele.simionato at michele.simionato at
Mon Jan 3 09:51:21 EST 2005

(Not sure if my other message arrived)

I am guilty of using this idiom, too.

The standard library


These objects contain the original values of stdin, stderr and
stdout at the start of the program. They are used during finalization,
and could be useful to restore the actual files to known working file
objects in case they have been overwritten with a broken object.

Notice the "during finalization" sentence.
Maybe you should change the doc and explain what __stdout__ is intended

        Michele Simionato

More information about the Python-list mailing list