assert may not work as expected | Leetao's Blog
Opened this issue · 0 comments
LeetaoGoooo commented
https://leetao94.cn/2022/10/12/assert-may-not-work-as-expected/
assert (断言) 是在编码过程中常用的手段,使用方法如下: 1234567# example.py# assert_stmt ::= "assert" expression ["," expression]def is_admin(user_roles): assert isinstance(user_roles,list) and user_