How to avoid "f.close" (no parens) bug?

Peter Hansen peter at engcorp.com
Thu Feb 12 13:40:45 EST 2004


Paul Prescod wrote:
> 
> But I might write
> 
>    foo(bar[0].doSomething)

Good point.  Given that this is much more likely to be deliberate,
it's also more likely to occur as a mistake for those of us who
would "never" write f.close accidentally.

I also leave off the odd colon, though I believe that's the only
such error I've made more than maybe once with Python.  Never left
quotes off anything that was supposed to have them, unless it was
strictly a slip of the finger (instead of the mind).

-Peter



More information about the Python-list mailing list