[Tutor] objects becoming pointers

chris Hynes cjhynes36 at hotmail.com
Wed Jul 15 17:19:32 CEST 2009


I guess I have to start somewhere to ask............

I want the user to input a name, say "Chris". I know I can use the code:

name=raw_input()

I now want:

"Chris"=zeros((3,3))

so that when I type:

print Chris

the return will be an array of zero's 3x3

So that I can understand this deeper, I know that "name" is just a pointer to the object "Chris". I don't want to just change the pointer to something else, like "zeros((3,3))" but I want to make "Chris" become the pointer or the name of the pointer. At least that's what I think I want.

_________________________________________________________________
Windows Live™ SkyDrive™: Get 25 GB of free online storage.
http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_SD_25GB_062009
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20090715/e0920621/attachment.htm>


More information about the Tutor mailing list