type error raise

T

timo verbeek

what is the problem with this code?

_base={"repeat":False,"string":"Progres has failed","works":True}
print _base
class dictreturn(_base):pass

this error
Traceback (most recent call last):
File "<string>", line 244, in run_nodebug
File "C:\Documents and Settings\Owner\Desktop\Python\assistent new
\user\dictreturn.py", line 4, in <module>
class dictreturn(_base):pass
TypeError: Error when calling the metaclass bases
 
C

Chris Rebert

what is the problem with this code?

_base={"repeat":False,"string":"Progres has failed","works":True}
print _base
class dictreturn(_base):pass

You can't subclass a dictionary object, you can only subclass other
classes. What on earth are you trying to do?

Cheers,
Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top