import abc
import copy
class Life(object):
__metaclass__ = abc.ABCMeta
@abc.abstractmethod
def reproduce(self):
pass
class Bacterium(Life):
def reproduce(self):
return copy.deepcopy(self)
wiggly = Bacterium()
print 'The magic method mro is: {}'.format(wiggly.__class__.__mro__)
print 'The abc method mro is: {}'.format(wiggly.__class__.mro())
aW1wb3J0IGFiYwppbXBvcnQgY29weQoKY2xhc3MgTGlmZShvYmplY3QpOgoJX19tZXRhY2xhc3NfXyA9IGFiYy5BQkNNZXRhCgkKCUBhYmMuYWJzdHJhY3RtZXRob2QKCWRlZiByZXByb2R1Y2Uoc2VsZik6CgkJcGFzcwoKY2xhc3MgQmFjdGVyaXVtKExpZmUpOgoJZGVmIHJlcHJvZHVjZShzZWxmKToKCQlyZXR1cm4gY29weS5kZWVwY29weShzZWxmKQoKd2lnZ2x5ID0gQmFjdGVyaXVtKCkKCnByaW50ICdUaGUgbWFnaWMgbWV0aG9kIG1ybyBpczoge30nLmZvcm1hdCh3aWdnbHkuX19jbGFzc19fLl9fbXJvX18pCnByaW50ICdUaGUgYWJjIG1ldGhvZCBtcm8gaXM6IHt9Jy5mb3JtYXQod2lnZ2x5Ll9fY2xhc3NfXy5tcm8oKSk=