Getting happier ;-), but wondering if I'm thinking pythonically

Peter Hansen peter at engcorp.com
Tue May 20 19:57:34 EDT 2003


Brian Quinlan wrote:
> 
> I'm not going to answer whatever question that you asked but here are
> some style comments:
> 
> 2. explicitly closing files is not usually necessary (e.g. line 35)

Not necessary, under most conditions, with CPython, but definitely 
a good idea as noted in many past messages.  I don't think recommending 
removal of such code is good advice.  In fact, stylistically it now
seems like it would be better to recommend explicitly closing files
wherever possible.

-Peter




More information about the Python-list mailing list