class MM(dict):
def __init__(self, indexed, *args, **kwargs):
super(MM, self).__init__(*args, **kwargs) #must do it.
self['name'] = 'hello, this is a value'
self.go()
def go(self, kwargs):
print kwargs #I want this to print out the kwargs
How come this class creates an error when I try to initalize it?
>> m = MM()
TypeError: metaMod_Distance() takes exactly 2 arguments (1 given)
You probably want to do:
To take keyword only arguments. So the function call will work.
Also you have to pass something else to your constructor (because of unused argument
indexed):