![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Flask学习笔记
广慕君
勿在浮沙筑高台
展开
-
python中的异常处理 try..except
一、try…except 有时候我们写程序的时候,会出现一些错误或异常,导致程序终止。例如,做除法时,除数为0,会引起一个ZeroDivisionError 例子: ?1234a=10b=0c=a/bprint "done" 运行结果:Traceback (most recent call last): File “C:/Users/lirong/PycharmProjects/untitled/转载 2017-08-13 09:43:35 · 2319 阅读 · 0 评论 -
认识 Fields marshal marshal_with
Fieldsuser_fields = { 'id': fields.Integer, 'username': fields.String, 'email': fields.String, 'user_priority': fields.Integer, 'custom_greeting': fields.FormattedString('Hey there原创 2017-08-13 16:30:33 · 4667 阅读 · 0 评论