반응형

출처:http://stackoverflow.com/questions/14681096/typeerror-isinstance-arg-2-must-be-a-type-or-tuple-of-types


typeError: isinstance() arg 2 must be a type or tuple of types




>>> names=['jhon','jack']
>>> isinstance(names,list)
Traceback (most recent call last):
  File "<pyshell#291>", line 1, in <module>
    isinstance(names,list)
TypeError: isinstance() arg 2 must be a type or tuple of types
>>> 

에러 해결 방법
isinstance(names, __builtins__.list)
list이름을 __builtins__.list로 바꿔준다


반응형

+ Recent posts