Why GIL? (was Re: what's the point of rpython?)

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Sat Jan 24 09:40:10 CET 2009

En Sat, 24 Jan 2009 06:06:02 -0200, Carl Banks <pavlovevidence at gmail.com>  
> On Jan 23, 11:45 pm, Bryan Olson <fakeaddr... at 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

More information about the Python-list mailing list