Why doesn't deepcopy work on strings ?

Tony C cappy2112 at yahoo.com
Sun Feb 23 21:16:20 EST 2003


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 

thanks




More information about the Python-list mailing list