On Mon, 06 May 2013 18:23:02 -0400
Terry Jan Reedy <tjre...@udel.edu> wrote:
> 
> 'Item' is necessarily left vague for mutable sequences as bytearrays 
> also store values. The fact that Antoine's example 'works' for 
> bytearrays is an artifact of the caching, not a language-mandated
> necessity.

No, it isn't. You are mixing up values and references. A bytearray or a
array.array may indeed store values, but a list stores references to
objects.

I'm pretty sure that not respecting identity of objects stored in
general-purpose containers would break a *lot* of code out there.

Regards

Antoine.


_______________________________________________
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