Base class and Derived class question

cyberirakli at cyberirakli at
Tue Nov 6 14:47:03 CET 2012

Hey guys,
I'm trying to understand how is working base class and derived class.
So, I have to files and : 
[CODE]class baseClass():
    def bFunction(self):
        print "We are in a base class"[/CODE]
[CODE]import baseClass as baseClassMod

class derivedClass(baseClassMod):
    def dFunction(self):
        print "We are in a derived Class" [/CODE]

buwhen I'm trying to run I get this error :
[CODE][COLOR=Red]TypeError: Error when calling the metaclass bases
    module.__init__() takes at most 2 arguments (3 given)[/COLOR][/CODE]

Interesting thing is that if I run and then run :
[CODE]class derivedClass(baseClass):
    def dFunction(self):
        print "We are in a derived Class"[/CODE]
It works fine

More information about the Python-list mailing list