Re: Python internals question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Marc 'BlackJack' Rintsch

    Re: Python internals question

    On Tue, 15 Jul 2008 23:54:46 +1000, Peter Anderson wrote:
    "Python is a dynamically typed language in which names can represent
    values of different types during the execution of a program. In fact the
    names used in the program are really just labels for various quantities
    and objects. The assignment operator simply creates an association
    between a name and a value. This is different from C, for example, in
    which a name (variable) represents a fixed size and location in memory..."
    >
    As an old mainframe programmer, I understand the way C does things with
    variable but this text got me wondering how Python handles this
    "associatio n" between variable name and value at the lower level. Is it
    like a fifo list?
    Why a fifo list? Names don't remember the values and types they are bound
    to over time, there's just one binding at any time if a name exists.
    Internally you can think of a pointer to a struct that represents the
    object.

    Ciao,
    Marc 'BlackJack' Rintsch
Working...