摘要: 总结:1、若父类中有构造函数、并且子类也有构造函数 则子类的构造函数中必须调用父类的构造函数 以此来初始化父类【如:super().__init__()】2、子类调用父类的属性及方法(用self、super()都可以 建议用super()调用父类的 这样好区分) 阅读全文
posted @ 2020-08-22 21:23 淡怀 阅读(137) 评论(0) 推荐(0)
摘要: https://www.jianshu.com/p/2868b3193533 直接抛出异常 中断程序 捕获 try: 。。。 except Exception as e: print(e.args[0].reason.args[0]) 阅读全文
posted @ 2020-08-22 11:46 淡怀 阅读(123) 评论(0) 推荐(0)