On Tue, Jan 8, 2013 at 1:45 AM, Dave Angel <d...@davea.name> wrote: > On 01/07/2013 09:32 AM, marduk wrote: >> So I guess if one *really* wanted to compare C variables to Python >> variables, you could say that all python variables are of type void* >> except Python does all mallocs/frees and the casting for you. > > A better analogy would be to C++, and all names would be something like > shared_ptr<object*>. And (except for old-style classes) all actual data > is of a type derived from object.
But yes, a C pointer variable is closest to a Python local, with actual content always stored on the heap. ChrisA -- http://mail.python.org/mailman/listinfo/python-list