for key in usersDict:
user = usersDict.get(key)
usersList.append(user)
if user.get_Quantity() == 0:
emptyStock = user.get_Name()
flash("%s is out of stock!!")%emptyStock
else:
continue
错误信息:
类型错误: % 不支持的操作数类型:"无类型"和"str">
对字符串使用%s
有错吗?
括号在错误的位置。
闪存("%s 缺货了!!%空库存
应该是
flash("%s is out of stock!!"%emptyStock)