In the current implementation, the built-in variable __debug__ is True
under normal circumstances, False when optimization is requested
(command line option -O). The current code generator emits no code for
an assert statement when optimization is requested at compile time.
使用命令行选项
-O
。如the docs所述:相关问题 更多 >
编程相关推荐