Why GIL? (was Re: what's the point of rpython?)
Paul Rubin
http
Fri Jan 23 22:42:20 EST 2009
Steven D'Aprano <steve at REMOVE-THIS-cybersource.com.au> writes:
> For example... is this instance immutable?
>
> class Foo:
> bar = None
>
> f = Foo()
> f.baz = True
> If so, what do you mean by immutable?
If I understand Carl, yes, f is immutable. When you set f.bar, the
contents of f.__dict__ changes but f itself does not change. It still
points to the same dictionary, etc.
More information about the Python-list
mailing list