~玉米糊~
慢慢来,也会很快。 非宁静无以志学,学什么都一样,慢慢打基础,找规律、认真、坚持,其余的交给时间。
随笔 - 117,  文章 - 17,  评论 - 1,  阅读 - 82072
摘要: 1. 请解释什么是转发与重定向,它们有什么区别 转发:对web用户是透明的,或者说在Web浏览器中的Url是不会变的,在服务器会根据Url去读取特定的资源,并将资源的内容返回给客户端 http://localhost:5000/test.tml 服务端资源对于用户不一定是可访问的 重定向:用户是可见 阅读全文
posted @ 2022-04-21 10:43 yuminhu 阅读(904) 评论(0) 推荐(0) 编辑
摘要: 1. 静态路由和动态路由有什么区别 路由:Url Path http://localhost/abc/test.html abc/test.html 静态路由:Path与路由函数一一对应 动态路由:多个Path与同一个路由函数对应 http://localhost/abc/test.html htt 阅读全文
posted @ 2022-04-21 10:16 yuminhu 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 请通过代码说明try...except... else 中else子句的作用 while True: try: x = int(input('请输入x:')) y = int(input('请输入y:')) value = x / y print('x / y is ', value) pass e 阅读全文
posted @ 2022-04-21 09:05 yuminhu 阅读(25) 评论(0) 推荐(0) 编辑
摘要: 1. python是否支持多继承,请举例说明 支持多继承 class Calculator: def calculate(self, expression): return eval(expression) class MyPrint: def print(self, msg): print('ms 阅读全文
posted @ 2022-04-21 09:00 yuminhu 阅读(38) 评论(0) 推荐(0) 编辑
摘要: 用代码描述如何定义异常类、抛出异常类以及捕捉异常类 class MyException(Exception): pass num = 12 try: if num >= 10: raise MyException('抛出异常') print('正常执行代码') except MyException: 阅读全文
posted @ 2022-04-21 08:44 yuminhu 阅读(18) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示