Python's "only one way to do it" philosophy isn't good?

Lenard Lindstrom len-l at
Fri Jun 29 22:27:55 CEST 2007

Douglas Alan wrote:
> [I]n Python, you can be 100% sure that your files
> will be closed in a timely manner without explicitly closing them, as
> long as you are safe in making certain assumptions about how your code
> will be used.  Such assumptions are called "preconditions", which are
> an understood notion in software engineering and by me when I write
> software.

So documenting an assumption is more effective than removing the 
assumption using a with statement?

Lenard Lindstrom
<len-l at>

More information about the Python-list mailing list