Python 4 - University of Arizona

Cloning differs from inheritance in that each new instance gets its own copy of all inherited variables. >>> cat1.sound = 'Moo' >>> cat2.sound 'Purr' # Had cat1 been a prototype, cat2 would now say "Moo". Calling a function from an instance assigns that instance to a global variable . __self__. then calls the function. ................
................