John Fouhy wrote: > On 08/11/2007, Marc Tompkins <[EMAIL PROTECTED]> wrote: > >> Now, I did already (intellectually) understand this: >> A list is an array of pointers to objects, what you've done here is >> create a new name referencing an item in the list, then making that new >> name point to something different. >> Given that, however, I still don't entirely understand why the other >> examples I gave DO work. Seems it should be one or the other, no? >> > > Could you post some code/results (or an interpreter session) showing > one of the other examples working? > > If you did, for example, > > tmpSegs = inString.split(self.SegTerm) > for seg in tmpSegs: > seg = 'bananas' > > I would expect tmpSegs to be unchanged. If it is changed, then that > seems strange to me.. > > I'd like to see it, too. I'll admit, I didn't finish reading your post, so I missed replying to that, but honestly I don't think it should do what you say it does.
:-) _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor