When is it a pointer (aka reference) - when is it a copy?

John Henry john106henry at hotmail.com
Wed Sep 13 19:14:51 CEST 2006

Hi list,

Just to make sure I understand this.

Since there is no "pointer" type in Python, I like to know how I do

For instance, if I do:

   ...some_huge_list is a huge list...
   aref = some_huge_list
   print some_huge_list[0]

we know that the answere will be 0.  In this case, aref is really a

But what if the right hand side is a simple variable (say an int)?  Can
I "reference" it somehow?  Should I assume that:

   aref = _any_type_other_than_simple_one

be a reference, and not a copy?


More information about the Python-list mailing list