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

Skip Montanaro skip at pobox.com
Wed Feb 11 17:05:30 CET 2004


    Facundo> #-     Warnings...
    Facundo> #- 
    Facundo> #-     foo.py:4: Statement appears to have no effect

    Facundo> Why "appears"?

I think Neal was just being conservative when he wrote that.  In fact, today
with properties and such, just the act of getting an attribute can have side
effects.  Determining for sure that there were no side effects would
probably require a lot more analysis, if it's even possible to determine
without actually executing the code.

Skip




More information about the Python-list mailing list