James> I suspect this would be a pessimization most of the time, as it
    James> would require keeping a list of pointers to all the views
    James> referencing the string object.

I'm skeptical about performance as well, but not for that reason.  A string
object can have a referent field.  If not NULL, it refers to another string
object which is INCREFed in the usual way.  At string deallocation, if the
referent is not NULL, the referent is DECREFed.  If the referent is NULL,
ob_sval is freed.

Skip
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to