Memory Address' of Python Objects

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Peter Markowsky

    Memory Address' of Python Objects

    Hi all,

    I've been searching through the Python Essential Reference, and
    python.org but I can't seem to find a way to get the memory address
    for an object in python. Please help. How do you get the address of an
    object in memory?

    Sincerely,

    Pete


    --
    It sure is fun to sit around at night, look up at the stars, and think
    about billion dollar computers owned by the government that can crack
    1024-bit RSA keys in 2 minutes flat. Makes you feel so small...

  • Gerhard Häring

    #2
    Re: Memory Address' of Python Objects

    Peter Markowsky wrote:[color=blue]
    > Hi all,
    >
    > I've been searching through the Python Essential Reference, and
    > python.org but I can't seem to find a way to get the memory address
    > for an object in python. Please help. How do you get the address of an
    > object in memory?[/color]

    id(obj)

    What do you intend to do with this information? If you want to use this
    to manipulate the object from outside Python, it's almost certainly the
    wrong way of doing it.

    -- Gerhard

    Comment

    Working...