So few code breakage is nice.
I also realized that the exec rule is still too string. If the exec statement passes an explicit namespace -- "exec in foo" -- then there shouldn't be any problem, because the executed code can't affect the current namespace. If this form is allowed, the exec errors in xpcom and Zope disappear.
My very personal feeling is that *any* rule on exec just sounds arbitrary (even if motived and acceptable).
regards, Samuele Pedroni.
"SP" == Samuele Pedroni firstname.lastname@example.org writes:
SP> My very personal feeling is that *any* rule on exec just sounds SP> arbitrary (even if motived and acceptable).
My personal feeling is that exec is used rarely enough that a few restrictions on its use is not a problem. The restriction can be fairly minimal -- "exec" without "in" is not allowed in a function that contains nested blocks with free variables.
Heck, we would just outlaw all uses of exec without in <0.5 wink>. I would argue for this rule in Python 3000, but it would break a lot more code than the restriction proposed above.