In the example below, I am deepcopying a base class and messing with the attributes of the copy. Why is this messing with the attributes of the original class? Is there any way to avoid this? The current code structure I am working with can't support multiple inheritance, so I really want to be able to somehow copy the class.
>>> class Base(object):
... foo = "bar"
...
>>> base_copy = copy.deepcopy(Base)
>>> del base_copy.foo
>>>
>>> base_again = copy.deepcopy(Base)
>>> hasattr(base_again, 'foo')
False
>>>