C
Carlo v. Dango
Hello there..
in the interactive shell in pythonWin I can type
True
but when I make this function
def isinstance(object, classtype):
if __builtins__.isinstance(object, classtype):
return True
else:
if __builtins__.isinstance(object, Wrapper): # if we are a
wrapper look somewhere else
return isinstance(object.ref, classtype)
return False
it fails with the error
File "foo.py", line xxx, in isinstance
if __builtins__.isinstance(object, classtype):
AttributeError: 'dict' object has no attribute 'isinstance'
What am I doing wrong here?
in the interactive shell in pythonWin I can type
True
but when I make this function
def isinstance(object, classtype):
if __builtins__.isinstance(object, classtype):
return True
else:
if __builtins__.isinstance(object, Wrapper): # if we are a
wrapper look somewhere else
return isinstance(object.ref, classtype)
return False
it fails with the error
File "foo.py", line xxx, in isinstance
if __builtins__.isinstance(object, classtype):
AttributeError: 'dict' object has no attribute 'isinstance'
What am I doing wrong here?