错误复现
# python代码
None < 1
报错:
TypeError: '<' not supported between instances of 'NoneType' and 'int'
报错表明了None
和int
不能做大小比较,编程时候需要注意排除这种情况。
错误复现
# python代码
None < 1
报错:
TypeError: '<' not supported between instances of 'NoneType' and 'int'
报错表明了None
和int
不能做大小比较,编程时候需要注意排除这种情况。