Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #108071

Re: Need help understanding list structure

From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Subject Re: Need help understanding list structure
Date 2016-05-03 23:47 +1000
Message-ID <mailman.346.1462283241.32212.python-list@python.org> (permalink)
References (3 earlier) <ab5d3884-77ed-45d4-86ab-0333bf67dca1@googlegroups.com> <85mvo8gh57.fsf@benfinney.id.au> <mailman.332.1462232638.32212.python-list@python.org> <b93a85c8-042a-4c1f-800e-68a02dac3b78@googlegroups.com> <CAPTjJmoRxJSqAJNmWvxz9oNi294s=weAtM7yXC86OMYqq4jtjA@mail.gmail.com>

Show all headers | View raw


On Tue, May 3, 2016 at 11:21 PM,  <moa47401@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.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Need help understanding list structure moa47401@gmail.com - 2016-05-02 14:30 -0700
  Re: Need help understanding list structure Erik <python@lucidity.plus.com> - 2016-05-02 22:48 +0100
    Re: Need help understanding list structure moa47401@gmail.com - 2016-05-02 15:33 -0700
      Re: Need help understanding list structure Michael Torrie <torriem@gmail.com> - 2016-05-02 17:25 -0600
      Re: Need help understanding list structure Ben Finney <ben+python@benfinney.id.au> - 2016-05-03 09:43 +1000
        Re: Need help understanding list structure moa47401@gmail.com - 2016-05-03 06:21 -0700
          Re: Need help understanding list structure Chris Angelico <rosuav@gmail.com> - 2016-05-03 23:47 +1000
            Re: Need help understanding list structure moa47401@gmail.com - 2016-05-03 09:01 -0700
              RE: Need help understanding list structure Dan Strohl <D.Strohl@F5.com> - 2016-05-03 16:52 +0000
                Re: Need help understanding list structure moa47401@gmail.com - 2016-05-03 10:31 -0700
                RE: Need help understanding list structure Dan Strohl <D.Strohl@F5.com> - 2016-05-03 17:54 +0000
                Use __repr__ to show the programmer's representation (was: Need help understanding list structure) Ben Finney <ben+python@benfinney.id.au> - 2016-05-04 04:14 +1000
                RE: Use __repr__ to show the programmer's representation (was: Need help understanding list structure) Dan Strohl <D.Strohl@F5.com> - 2016-05-03 18:35 +0000
                Re: Use __repr__ to show the programmer's representation (was: Need help understanding list structure) moa47401@gmail.com - 2016-05-03 12:24 -0700
                Re: Use __repr__ to show the programmer's representation (was: Need help understanding list structure) Random832 <random832@fastmail.com> - 2016-05-03 15:37 -0400
                Re: Need help understanding list structure MRAB <python@mrabarnett.plus.com> - 2016-05-03 20:57 +0100
                Re: Use __repr__ to show the programmer's representation (was: Need help understanding list structure) Chris Angelico <rosuav@gmail.com> - 2016-05-04 09:40 +1000

csiph-web