On Mon, Sep 26, 2011 at 9:03 AM, Masklinn
An other thing which strikes me as weird is that the proposal is basically the creation of private instance attribute on functions. Could you not get the same by actually setting an attribute on the function (this can not be used in lambdas in any case)?
def f(): print(f.i) f.i += 1 f.i = 17
No, because this fails if 'f' is rebound in the outer scope.
This proposal also does not help with the "reverse argument hack" in lambdas, since it's using a statement.
Correct, but the same can be said for 'nonlocal' itself. Besides, Guido has already nixed the lambda-friendly expression based suggestions. Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia