TypeError: '>' not supported between instances of 'int' and 'NoneType'
原因是 Python3 判断变量是否None不能用 >这种,例如
a = None
a > 10
# 就会抛出上面的错误,要改为
a = None
a is None
# 或者
a is not None
在Python2就不会出错
TypeError: '>' not supported between instances of 'int' and 'NoneType'
原因是 Python3 判断变量是否None不能用 >这种,例如
a = None
a > 10
# 就会抛出上面的错误,要改为
a = None
a is None
# 或者
a is not None
在Python2就不会出错