摘要: # 抛出异常# 计算两个整数的加法 def add(a, b): if type(a) != int or type(b) != int: # return raise TypeError("我这里只要int, 不要别的类型") return a + b add(123, "abc") # 程序运行 阅读全文
posted @ 2018-09-29 16:40 SuraSun 阅读(238) 评论(0) 推荐(0) 编辑