python BUG记录-'int' object has no attribute 'exists'

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_27695659/article/details/85697297

因为在查数据库的时候,比如12月29没有住房记录,所以查不到记录需要做判断
如: if total_bath[‘bath’]:
total_bathn =total_bath[‘bath’]
else:
total_bathn = 0

猜你喜欢

转载自blog.csdn.net/qq_27695659/article/details/85697297