[Python-Dev] extended print statement, uPre-PEP

Andrew Kuchling akuchlin@mems-exchange.org
Sun, 23 Jul 2000 11:56:27 -0400


On Sat, Jul 22, 2000 at 04:07:08PM -0400, Barry A. Warsaw wrote:
>print is incredibly convenient; I'd hate to write CGI scripts without
>it.  Why not make it just a little more so?

Bad example; quick-and-dirty CGI scripts may get away with using
print.  However, if you want decent error handling, such as not
outputting a partial page if you get an exception, you need to either
not use print, or replace sys.stdout to trap output from 'print' and
only send the output once it's all been generated.  

--amk