摘要: import hm_01_测试模块1 import hm_02_测试模块2 hm_01_测试模块1.say_hello() dog = hm_01_测试模块1.Dog() print(dog) hm_02_测试模块2.say_hello() cat = hm_02_测试模块2.Cat() print 阅读全文
posted @ 2019-08-23 21:33 才华配得上梦想 阅读(123) 评论(0) 推荐(0) 编辑
摘要: def demo1(): return int(input("请输入一个整数")) def demo2(): return demo1() # 利用异常的传递性 ,在主程序捕获异常 try: print(demo2()) except Exception as result: print("未知错误 阅读全文
posted @ 2019-08-23 20:50 才华配得上梦想 阅读(152) 评论(0) 推荐(0) 编辑