Modifying Class Object
steve at REMOVE-THIS-cybersource.com.au
Tue Feb 16 00:09:59 CET 2010
On Mon, 15 Feb 2010 21:25:23 +0000, Arnaud Delobelle wrote:
> John Posner <jjposner at optimum.net> writes: [...]
>>> x = s
>> assigns the name *x* to the object that *s* refers to
> s does not refer to an object, it *is* an object (once evaluated of
> course, otherwise it's just a Python expression).
Precisely. Treated as an expression, that is, as a string being evaluated
by the compiler, we would say that it *refers to* an object (unless
evaluation fails, in which case it refers to nothing at all). But treated
as whatever you get after the compiler is done with it, that is, post-
evaluation, we would say that it *is* an object.
This subtle distinction is essentially the difference between a label and
the thing that is labeled.
More information about the Python-list