grocery_stocker wrote: > It seems like id(list[<some value>]) == id(<some value>). However, I > can't find anything in the python documentation that talks about it. > Did I perhaps overlook something?
most of your examples stated the obvious (that if x is in a list l at index i then id(list[i]) == id(x) - this is because list[i] is x). but that is not what you state above in words (and which is wrong). the only non-trivial thing in your post is that two different instances of (an object representing) the same value have the same id, and that is due to implementation specific caching. but i am worried you think you have seen something that you have not, especially given your incorrect text above. andrew -- http://mail.python.org/mailman/listinfo/python-list