jjzjj

tracebacklimit

全部标签

python - 打印错误消息而不打印回溯,并在不满足条件时关闭程序

我见过与此类似的问题,但没有一个真正解决引用通告问题。如果我有这样的类(class)classStop_if_no_then():def__init__(self,valueone,operator,value_two,then,line_or_label,line_number):self._firstvalue=value_oneself._secondvalue=value_twoself._operator=operatorself._gohere=line_or_labelself._then=thenself._line_number=line_numberdefexecu

python - 打印错误消息而不打印回溯,并在不满足条件时关闭程序

我见过与此类似的问题,但没有一个真正解决引用通告问题。如果我有这样的类(class)classStop_if_no_then():def__init__(self,valueone,operator,value_two,then,line_or_label,line_number):self._firstvalue=value_oneself._secondvalue=value_twoself._operator=operatorself._gohere=line_or_labelself._then=thenself._line_number=line_numberdefexecu