Need help understanding list structure

Chris Angelico rosuav at gmail.com
Tue May 3 09:47:18 EDT 2016


On Tue, May 3, 2016 at 11:21 PM,  <moa47401 at gmail.com> wrote:
> Thanks for the replies. I definitely need a better understanding of "<CLASS object at ADDRESS>" when using Python objects. So far no luck with web searches or my Python books. Could someone point (no pun intended) me to a good resource?
>
> Not that it matters, but the reason I got off track is there are pointers within my data that point to other pieces of the data and have nothing to do with Python.

What you're seeing there is the default object representation. It
isn't actually quoting an address but an "identity number". The only
meaning of that number is that it's unique [1]; so if you see the same
number come up twice in the list, you can be confident that the list
has two references to the same object.

Beyond that, it basically tells you nothing. So you know what kind of
object it is, but anything else you'll have to figure out for
yourself.

ChrisA

[1] Among concurrently-existing objects; if an object disappears, its
ID can be reused.



More information about the Python-list mailing list