class error

monkeys paw monkey at joemoney.net
Fri Mar 18 16:13:52 EDT 2011


I have the following file:

FileInfo.py:

import UserDict

class FileInfo(UserDict):
	"store file metadata"
	def __init__(self, filename=None):
		UserDict.__init__(self)
		self["name"] = filename



When i import it like so:

import FileInfo


i get this error:

Traceback (most recent call last):
   File "<interactive input>", line 1, in <module>
   File "FileInfo.py", line 3, in <module>
     class FileInfo(UserDict):
TypeError: Error when calling the metaclass bases
     module.__init__() takes at most 2 arguments (3 given)

What is causing the error?



More information about the Python-list mailing list