In <mailman.596.1251474438.2854.python-l...@python.org> Ethan Furman <et...@stoneleaf.us> writes:
>kj wrote: >> Miles Kaufmann <mile...@umich.edu> writes: >>>...because the suite >>>namespace and the class namespace would get out of sync when different >>>objects were assigned to the class namespace: >> >> >>>class C: >>> x = 1 >>> def foo(self): >>> print x >>> print self.x >> >> >>>>>>o = C() >>>>>>o.foo() >>> >>>1 >>>1 >>> >>>>>>o.x = 2 >>>>>>o.foo() >>> >>>1 >>>2 >> >> >> But this unfortunate situation is already possible, because one >> can already define >> >> class C: >> x = 1 >> def foo(self): >> print C.x >> print self.x >> >> which would lead to exactly the same thing. >> >This is not the same thing, and definitely not exactly the same thing. Thanks for the clarification! kynn -- http://mail.python.org/mailman/listinfo/python-list