{"id":156495,"date":"2020-09-17T09:14:24","date_gmt":"2020-09-17T01:14:24","guid":{"rendered":"http:\/\/4563.org\/?p=156495"},"modified":"2020-09-17T09:14:24","modified_gmt":"2020-09-17T01:14:24","slug":"%e5%85%b3%e4%ba%8e-python-%e7%9a%84%e4%b8%80%e4%b8%aa%e5%a4%9a%e7%ba%bf%e7%a8%8b%e7%9a%84%e8%af%a1%e5%bc%82%e7%9a%84%e5%bc%82%e5%b8%b8","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=156495","title":{"rendered":"\u5173\u4e8e Python \u7684\u4e00\u4e2a\u591a\u7ebf\u7a0b\u7684\u8be1\u5f02\u7684\u5f02\u5e38"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u5173\u4e8e Python \u7684\u4e00\u4e2a\u591a\u7ebf\u7a0b\u7684\u8be1\u5f02\u7684\u5f02\u5e38               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : 18870715400 <\/span>  <span><i><\/i> 1<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<h2>\u4ee3\u7801\u7684\u94fe\u63a5<\/h2>\n<p>https:\/\/gist.github.com\/GandalfLiu\/bfa270cbd9dd0297e4c871f5cbb4c7fc<\/p>\n<h2>\u9519\u8bef\u5f02\u5e38,\u5f53\u540c\u65f6\u6267\u884c\u7684\u4efb\u52a1\u8d85\u8fc7 3 \u4e2a\u6bd4\u5982 4 \u4e2a\u7684\u65f6\u5019, \u8fd9\u65f6\u5019\u4f1a\u53d1\u751f\u5728\u4ee3\u7801\u903b\u8f91\u4e4b\u5916\u7684\u9519\u8bef<\/h2>\n<pre><code>\u5f53\u6709\u56db\u4e2a\u4efb\u52a1\u52a0\u5165\u961f\u5217\u4e2d\u7684\u65f6\u5019, \u5982 1, 2, 3, 4 \u524d\u9762 1 \u548c 2 \u53f7\u4efb\u52a1\u6b63\u5e38\u6267\u884c, \u4ea7\u751f\u5bf9\u5e94\u7684\u7ed3\u679c 1 \u548c \u7ed3\u679c 2 \u4f46\u662f\u7b2c 3 \u4e2a\u8fd9\u65f6\u5019\u4f1a\u76f4\u63a5\u5148\u4ea7\u751f 2 \u4e2a\u9519\u8bef\u7ed3\u679c,\u6570\u636e\u5e93\u4e2d\u786e\u8ba4\u5df2\u7ecf\u4ea7\u751f\u4e86,  \u7136\u540e\u6267\u6b63\u5e38\u6267\u884c\u4efb\u52a1 4 \u5e76\u4e14\u4ea7\u751f\u7ed3\u679c, \u7136\u540e\u53c8\u4f1a\u518d\u6b21\u53bb\u6267\u884c\u4efb\u52a1 3, \u5e76\u4e14\u6b63\u5e38\u6267\u884c\u7136\u540e\u4ea7\u751f\u7ed3\u679c, \u8fd9\u65f6\u5019\u5c31\u4f1a\u6709 6 \u4e2a\u7ed3\u679c, 4 \u4e2a\u6210\u529f\u7684\u7ed3\u679c, \u8fd8\u6709\u5bf9\u5e94\u7684\u4efb\u52a1 3 \u7684\u4e24\u4e2a\u5931\u8d25\u7ed3\u679c   \u8be1\u5f02\u5206\u6790: 1. \u65e5\u5fd7\u8bb0\u5f55\u7684\u633a\u8be6\u7ec6\u7684, \u4f46\u662f\u5176\u4e2d\u6ca1\u6709\u53d1\u73b0\u4efb\u52a1\u9519\u8bef, \u4efb\u52a1 3 \u4f1a\u65e0\u7f18\u65e0\u6545\u7684\u4ea7\u751f 2 \u4e2a\u9519\u8bef\u7684\u7ed3\u679c, \u4f46\u662f\u91cc\u9762\u627e\u4e0d\u5230\u4efb\u4f55\u9519\u8bef\u8bb0\u5f55 2. \u6309\u7167\u6b63\u5e38\u60c5\u51b5, \u4efb\u52a1 3 \u7b2c\u4e00\u6b21\u5931\u8d25\u4e86\u4e4b\u540e\u5c31\u5e94\u8be5\u66f4\u6539\u5bf9\u5e94\u7684\u6570\u636e\u5e93\u7684\u4efb\u52a1 status \u4e3a 2, \u8be5\u4efb\u52a1\u5c31\u4e0d\u4f1a\u52a0\u5165\u5230\u961f\u5217\u4e2d\u4e86, \u4f46\u662f\u5b9e\u9645\u60c5\u51b5\u540e\u9762\u8fd8\u662f\u4f1a\u7ee7\u7eed\u6267\u884c\u4e00\u6b21, \u7136\u540e\u7ee7\u7eed\u5931\u8d25, \u7136\u540e\u518d\u6267\u884c\u4e00\u6b21\u7136\u540e\u6210\u529f, \u7136\u540e\u6267\u884c\u7684\u4efb\u52a1\u72b6\u6001\u5c31\u88ab\u66f4\u6539\u4e3a 3 \u4e86.\u4f46\u662f\u6267\u884c\u5931\u8d25\u7684\u60c5\u51b5\u627e\u4e0d\u5230\u4efb\u4f55\u7684\u5931\u8d25\u65e5\u5fd7\u8bb0\u5f55, \u6570\u636e\u5e93\u8bb0\u5f55\u65e5\u5fd7\u627e\u4e0d\u5230\u4efb\u4f55\u9519\u8bef. 3. \u5f53\u540c\u65f6\u6267\u884c\u4efb\u52a1\u7684\u6b21\u6570\u5c0f\u4e8e 3 \u4e2a\u7684\u65f6\u5019,\u6b63\u5e38\u903b\u8f91\u8fd0\u884c, \u5c31\u662f\u8d85\u8fc7 3 \u4e2a\u51fa\u95ee\u9898  controller.py \u6587\u4ef6\u548c logic.py \u6587\u4ef6\u5e94\u8be5\u6ca1\u6709\u5565\u95ee\u9898, \u76ee\u6d4b\u95ee\u9898\u4e3b\u8981\u5728\u591a\u7ebf\u7a0b\u4e0a\u9762, \u67e5\u4e86\u597d\u51e0\u5929, \u6709\u5927\u795e\u5e2e\u5fd9\u770b\u770b\u591a\u7ebf\u7a0b\u7684\u4ee3\u7801\u54ea\u91cc\u51fa\u95ee\u9898\u4e86\u4e48? <\/code><\/pre>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>5<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"3326125\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ruanimal <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             try \u548c finally \u91cc\u9762\u7684\u4ee3\u7801\u5757\u90fd\u4f1a\u88ab\u6267\u884c\uff0c\u5728\u6ca1\u6709\u51fa\u9519\u7684\u60c5\u51b5\u4e0b\u3002<\/p>\n<p>\u800c\u4e14\u65e2\u7136\u4f60 try \u4e86\uff0cexcept \u91cc\u9762\u4e3a\u5565\u4e0d\u6253\u65e5\u5fd7\u3002\u3002 \u770b\u65e5\u5fd7\u5c31\u77e5\u9053\u7ed3\u679c\u4e86\u554a                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3326126\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ruanimal <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u800c\u4e14\u4f60\u8fd9\u4e2a\u4ee3\u7801\u6bcf\u4e2a\u4eba\u7269\u90fd\u4f1a\u5efa\u7acb\u4e00\u4e2a\u6570\u636e\u5e93\u8fde\u63a5\uff0c\u4efb\u52a1\u591a\u4e86\u6570\u636e\u5e93\u8fde\u63a5\u76f4\u63a5\u7206\u70b8\u3002<\/p>\n<p>ps: \u611f\u89c9 lz \u662f\u5199 java \u51fa\u8eab\u7684\u5427                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3326127\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : 18870715400 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @ruanimal \u8be1\u5f02\u7684\u5c31\u662f except \u91cc\u7684\u65e5\u5fd7\u90fd\u6ca1\u6709\u6253\u5370                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3326128\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ruanimal <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @18870715400 \u4f60\u90fd\u6ca1\u5199\u6253\u65e5\u5fd7\u7684\u4ee3\u7801\uff0c\u5f53\u7136\u6ca1\u65e5\u5fd7\u554a                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3326129\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : 18870715400 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u7ecf\u8fc7\u6392\u67e5\uff0c \u662f\u56e0\u4e3a\u591a\u7ebf\u7a0b\u6267\u884c\u987a\u5e8f\u6df7\u4e71\u5bfc\u81f4\u51fa\u73b0\u7684\u95ee\u9898                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u5173\u4e8e Python \u7684\u4e00\u4e2a\u591a\u7ebf\u7a0b\u7684&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/156495"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=156495"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/156495\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=156495"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=156495"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=156495"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}