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

Jeff Epler jepler at unpythonic.net
Wed Feb 11 11:38:58 EST 2004


On Wed, Feb 11, 2004 at 12:56:09PM -0300, Batista, Facundo wrote:
> And why is this useful?
> 
> In other words, what happen if the interpreter does not let you do
> "t.spanish_inquisition"?

Well, for one thing, valid Python programs would stop being valid.  This
is never something to be done lightly.

For another, there may be legitimate uses, when it's specifically to
cause the side effect that computation of the property requires
(especially in the context of software testing).  For instance, see
    http://weblogs.mozillazine.org/hyatt/archives/2003_08.html#003963
Personally, I view the fact that javascript (apparently) requires
assigment to a dummy variable as a drawback of js.


Jeff




More information about the Python-list mailing list