python中判断变量类型应该用isinstance() 而不要用type

如 n = 10 , 判断n是否为int, isinstance(n, int)

posted on 2016-04-16 23:01  chimmu  阅读(219)  评论(0)    收藏  举报