Why doesn't deepcopy work on strings ?
Gerrit Holl
gerrit at nl.linux.org
Mon Feb 24 04:49:07 EST 2003
More information about the Python-list mailing list
Mon Feb 24 04:49:07 EST 2003
- Previous message (by thread): Why doesn't deepcopy work on strings ?
- Next message (by thread): Why doesn't deepcopy work on strings ?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Tony C schreef op maandag 24 februari om 03:27:22 +0000: > Why doesn't deepcopy() on a string make a deep copy of that string ? > > Would someone explain this .. > import copy > s1="monty python" > s2=copy.deepcopy(s1) > id(s1) > 19114192 > id(s2) > 19114192 Try: s1[:] to copy a string. yours, Gerrit. -- Asperger Syndroom - een persoonlijke benadering: http://people.nl.linux.org/~gerrit/ Het zijn tijden om je zelf met politiek te bemoeien: http://www.sp.nl/
- Previous message (by thread): Why doesn't deepcopy work on strings ?
- Next message (by thread): Why doesn't deepcopy work on strings ?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list