En Sat, 24 Jan 2009 06:06:02 -0200, Carl Banks <pavlovevide...@gmail.com> escribió:
On Jan 23, 11:45 pm, Bryan Olson <fakeaddr...@nowhere.org> wrote:
Carl Banks wrote:
> Classes in Python are mutable types, usually.  Class instances are
> (except for the refcount) immutable objects, usually.

There's where we disagree. I assert that class instances are usually
mutable objects.

Nope, you're dead wrong, nothing more to it.  The bits of a class
instance never change.  The __dict__ is a mutable object.  The class
instance itself isn't.  It's not reasonable to call an object whose
bits can't change a mutable obect.

Anyway, all you're doing is distracting attention from my claim that
instance objects wouldn't need to be locked.  They wouldn't, no matter
how mutable you insist these objects whose bits would never change
are.

Me too, I don't get what you mean. Consider a list instance, it contains a count of allocated elements, and a pointer to some memory block. They change when the list is resized. This counts as "mutable" to me. I really don't understand your claim.

--
Gabriel Genellina

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to