Finding the instance reference of an object

Aaron Brady castironpi at gmail.com
Tue Nov 4 19:22:16 EST 2008


On Nov 4, 5:02 pm, Joe Strout <j... at strout.net> wrote:
> On Nov 4, 2008, at 3:42 PM, Steven D'Aprano wrote:
> > When we're talking about the value of a variable in Python, why on  
> > earth
> > would you drag entities that do not exist in Python into the  
> > discussion?
>
> I don't, but others do, for example bringing up C structs or C++  
> objects on the stack, which don't exist in Python (Python objects live  
> on the heap, and all you have on the stack are references to them; the  

I actually saw an implementation of Python once that did not have
references-to-objects on its stack.  It kept them on the heap, and
kept references to those containers in another container.  The second
container was a global variable, so that was on the stack at least.
This strongly seems to interfere with your analogy to C++'s c-b-v
mode.

On the other hand, you could say that VB.NET's c-b-v mode is not true
to C++'s c-b-v mode, in which case lots of people will just side with C
++.



More information about the Python-list mailing list