IT기술 관련/파이썬_루비 등 언어
[파이썬] typeError: isinstance() arg 2 must be a type or tuple of types 에러 해결
호레
2016. 9. 21. 08:00
반응형
출처: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로 바꿔준다
반응형