changing `assert` to `AssertionError`
This `assert` statement does not provide any error message making debugging this case hard. Moreover, `assert` is eliminated when using optimized python code (https://docs.python.org/2.7/reference/simple_stmts.html#the-assert-statement), introducing a potential bug into the system. Explicitly checking and raising an AssertionError will prevent this from happening.
正在显示
请
注册
或者
登录
后发表评论