Python: functions in a class and memory

Viewed 2798

If I have a class with several functions:

class Example:

    def func1(self):
        print 'Hi1'
    def func2(self):
        print 'Hi2'
    def func3(self):
        print 'Hi3'

If I create several instances of 'Example', does each instance store its own copies of the functions in the class? Or does Python have a smart way to store the definition only once and look it up every time an instance uses a function in the class?

Also, what about static functions? Does the class keep only one copy of each static function?

2 Answers
Related