How to copy a ClassObject?
_karlo_ at _mosor.net_
Tue Mar 20 14:08:58 CET 2007
how would one make a copy of a class object? Let's say I have:
name = 'First'
And then I write:
tmp = First
then 'tmp' becomes just a reference to First, so if I write
tmp.name = "Tmp", there goes my First.name. So, how to make 'tmp' a copy
of First, I tried using copy.copy and copy.deepcopy, but that doesn't
Yes, I can do a:
but I'd rather make a copy than a subclass.
_______ Karlo Lozovina - Mosor
| | |.-----.-----. web: http://www.mosor.net || ICQ#: 10667163
| || _ | _ | Parce mihi domine quia Dalmata sum.
More information about the Python-list