String Methods Don't Change ID?
Kamilche
klachemin at home.com
Mon Jan 27 22:48:17 EST 2003
Peter Hansen <peter at engcorp.com> wrote in message news:<3E35A9B3.87D605DC at engcorp.com>...
>
> Finish up your example by typing "quest" again:
>
> >>> quest
> 'what is your favorite color?'
>
> Hmm.... neither very centered, nor capitalized, is it? So it hasn't
> been modified. ;-)
>
Heheheh, I get it now, thanks. :-)
Calling a method on a string SEEMS like it should modify the original,
not create a new one, but I guess strings are 'special' all the way
around. To me, it's kinda like saying 'person.logon(logonid,
password)' creating a new person object and logging them on, while
leaving the original person untouched.
More information about the Python-list
mailing list