On 2006-07-27 17:10:55, Bruno Desthuilliers wrote: >> Isn't being on the LHS the only way to write to a non-mutable object? > > You *don't* "write to a non-mutable object". You rebind the name to > another object (mutable or not, that's not the problem).
Ok, sloppy writing (sloppy thinking, or probably incomplete understanding :) on my part. Let me rephrase the three original questions: >> Isn't being on the LHS the only way to write to a non-mutable object? Are >> there situations where binding happens without writing to a variable? Are >> there write accesses to non-mutable objects where the name is not on the >> LHS? Rephrased as: Isn't being on the LHS (of an assignment) the only way to (re)bind a variable? Are there situations where binding happens without an explicit assignment with the variable name being on the LHS? Can the object referenced by a variable name get changed without the variable name appearing on the LHS? (I hope I got this right now... asking the correct questions is not so easy sometimes :) Thanks, Gerhard -- http://mail.python.org/mailman/listinfo/python-list