not sure exactly why you would want to that, but you could assign attributes to a class
EX: class storage: pass >> store = Storage() >> name=raw_input() >> setattr(store, name, zeros(3,3)) >> print store.Chris On Wed, Jul 15, 2009 at 9:19 AM, chris Hynes <cjhyne...@hotmail.com> wrote: > 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. Get it on your > BlackBerry or > iPhone.<http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_SD_25GB_062009> > > _______________________________________________ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor > >
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor