{"id":185993,"date":"2020-10-27T10:40:08","date_gmt":"2020-10-27T02:40:08","guid":{"rendered":"http:\/\/4563.org\/?p=185993"},"modified":"2020-11-06T01:32:42","modified_gmt":"2020-11-05T17:32:42","slug":"%e6%9c%a8%e5%85%b0%e7%bc%96%e7%a8%8b%e8%af%ad%e8%a8%80-0-0-14-7%ef%bc%9a%e5%8a%9f%e8%83%bd%e8%a6%86%e7%9b%96%e5%88%9d%e7%89%88%e7%94%a8%e6%88%b7%e6%89%8b%e5%86%8c%ef%bc%9b-gitee-go-%e6%b5%81%e6%b0%b4","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=185993","title":{"rendered":"\u6728\u5170\u7f16\u7a0b\u8bed\u8a00 0.0.14.7\uff1a\u529f\u80fd\u8986\u76d6\u521d\u7248\u7528\u6237\u624b\u518c\uff1b Gitee Go \u6d41\u6c34\u7ebf\u5c1d\u9c9c"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u6728\u5170\u7f16\u7a0b\u8bed\u8a00 0.0.14.7\uff1a\u529f\u80fd\u8986\u76d6\u521d\u7248\u7528\u6237\u624b\u518c\uff1b Gitee Go \u6d41\u6c34\u7ebf\u5c1d\u9c9c               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : xuanwu <\/span>  <span><i><\/i> 5<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u77e5\u4e4e\u539f\u6587\uff1a\u6728\u5170\u7f16\u7a0b\u8bed\u8a00 0.0.14.7\uff1a\u529f\u80fd\u8986\u76d6\u521d\u7248\u7528\u6237\u624b\u518c\uff1b Gitee Go \u6d41\u6c34\u7ebf\u5c1d\u9c9c<\/p>\n<p><em><strong>\u6728\u5170\u7f16\u7a0b\u8bed\u8a00 \u5728 2020 \u5e74\u5ea6 OSC \u4e2d\u56fd\u5f00\u6e90\u9879\u76ee\u8bc4\u9009 \u4e2d\u5df2\u83b7\u5f97 26 \u7968\uff0c\u8bf7\u6295\u7968\u652f\u6301\uff01<\/strong><\/em><\/p>\n<p>\u5e74\u521d\u5bf9\u539f\u59cb\u6728\u5170\u53ef\u6267\u884c\u6587\u4ef6 ulang-0.2.2.exe \u4f5c\u4e86\u4e9b\u529f\u80fd\u4e0a\u7684\u6478\u7d22\u5c1d\u8bd5\uff0c\u5c06\u57fa\u672c\u529f\u80fd\u5199\u5728\u521d\u7248\u7528\u6237\u624b\u518c\u3002\u5f00\u5c55\u91cd\u73b0\u9879\u76ee\u4e4b\u540e\uff0c\u4e00\u76f4\u6ca1\u91cd\u8d70\u4e00\u904d\u624b\u518c\u4e2d\u7684\u4f8b\u7a0b\u3002\u4e0a\u5468\u7ec8\u4e8e\u5b8c\u6210\u4e86\u8fd9\u4e2a\u7efc\u5408\u5404\u90e8\u5206\u529f\u80fd\u7684\u201d\u5c0f\u6d4b\u9a8c\u201c\uff0c\u5927\u90e8\u5206\u4f8b\u7a0b\u5728\u4e0a\u4e00\u7248\u672c\u5c31\u80fd\u6b63\u786e\u8fd0\u884c\uff0c\u4f59\u4e0b\u7684\u5c0f\u90e8\u5206\u5728\u8fd9\u4e2a\u7248\u672c\u4e2d\u4e5f\u901a\u8fc7\u4e86\u3002<\/p>\n<p>[\u5b89\u88c5\uff1a<code>pip install ulang<\/code>\uff0c\u7528\u6cd5\u4e0e\u4f8b\u7a0b\u8bf7\u89c1 PyPI\u3002\u6e90\u7801\u4f4d\u4e8e\u5f00\u6e90\u4e2d\u56fd\u3002 <em><strong>\u6ce8\u610f\uff1a\u5fc5\u9700 python 3.7\uff0c\u6e90\u7801\u6587\u4ef6\u9700 UTF-8 \u7f16\u7801<\/strong><\/em>]<\/p>\n<h2>\u6b64\u7248\u672c\u91cd\u73b0\u529f\u80fd<\/h2>\n<h3>\u5b57\u7b26\u4e32\u8f6c\u4e49<\/h3>\n<p>\u6bd4\u8f83\u7279\u522b\u7684\u662f\u53cd\u659c\u6760\uff08\u6728\u5170\u4ea4\u4e92\u73af\u5883\u4e0b\u6548\u679c\uff09\uff1a<\/p>\n<pre><code>&gt; 'c'+'name' cname <\/code><\/pre>\n<p>\u5728 Python \u4e2d\u53cd\u659c\u6760\u5982\u679c\u672a\u914d\u5bf9\uff0c\u4f1a\u62a5\u8bed\u6cd5\u9519\u8bef\uff1a<\/p>\n<pre><code>&gt;&gt;&gt; print('')   File \"&lt;stdin&gt;\", line 1     print('')              ^ SyntaxError: EOL while scanning string literal &gt;&gt;&gt; print('')   File \"&lt;stdin&gt;\", line 1     print('')                ^ SyntaxError: EOL while scanning string literal <\/code><\/pre>\n<p>\u914d\u5bf9\u540e Python \u7684\u6548\u679c\uff1a<\/p>\n<pre><code>&gt;&gt;&gt; print('')  &gt;&gt;&gt; print('\\')  <\/code><\/pre>\n<p>\u6bd4\u7167\u6728\u5170\u4e2d\u53cd\u659c\u6760\u8f6c\u4e49\u6548\u679c\uff1a<\/p>\n<pre><code>&gt; println('')  &gt; println('')  &gt; println('')  &gt; println('\\')  &gt; println('\\')  &gt; println('\\')  <\/code><\/pre>\n<p>\u5b9e\u73b0\u7ec6\u8282\u53ef\u89c1\u6e90\u7801\uff0c\u4e2a\u4eba\u611f\u89c9\u521d\u7528\u6709\u4e9b\u522b\u626d\uff0c\u8fd9\u79cd\u4f7f\u7528\u573a\u666f\u5e94\u8be5\u4e0d\u591a\u3002<\/p>\n<p>\u53e6\u5916\u5f15\u53f7\u4e0e\u6362\u884c\u8f6c\u4e49\u65e0\u9700\u591a\u8a00\uff1a<\/p>\n<pre><code>&gt; 'doesn't' doesn't &gt; \"\"\u5403\u4e86\u4e48\uff1f\"\" \"\u5403\u4e86\u4e48\uff1f\" &gt; '\u7b2c\u4e00\u884cn \u7b2c\u4e8c\u884c' \u7b2c\u4e00\u884c \u7b2c\u4e8c\u884c <\/code><\/pre>\n<h3>\u51fd\u6570\u53c2\u6570\u6307\u5b9a\u7c7b\u578b<\/h3>\n<pre><code>&gt; type Person { &gt;&gt;   func $Person(name) { &gt;&gt;     $name = name &gt;&gt;   } &gt;&gt; } &gt; func hello(p : Person) { &gt;&gt; println(\"hi \" + p.name) &gt;&gt; } &gt; hello(Person(\"\u6728\u5170\")) hi \u6728\u5170 <\/code><\/pre>\n<h3>\u5f53\u524d\u8def\u5f84\u4e0b Python \u6a21\u5757\u5bfc\u5165<\/h3>\n<p>\u6bd4\u5982\u5f53\u524d\u8def\u5f84\u4e0b\u6709 <code>larger.py<\/code>\uff1a<\/p>\n<pre><code>def larger(a, b):     if a &gt; b:         print(a)     else:         print(b) <\/code><\/pre>\n<p>\u6728\u5170\u4ea4\u4e92\u73af\u5883\u4e0b\uff1a<\/p>\n<pre><code>&gt; using larger &gt; larger.larger(5,6) 6 <\/code><\/pre>\n<h3>\u5185\u7f6e enumerate \u51fd\u6570<\/h3>\n<p>\u53ef\u4ee5\u66f4\u65b9\u4fbf\u5730\u5b9a\u4e49\u679a\u4e3e\u4e86\uff1a<\/p>\n<pre><code>&gt; for i, v in enumerate(['\u5c0f', '\u4e2d', '\u5927']) { println(i, v) } 0 \u5c0f 1 \u4e2d 2 \u5927 <\/code><\/pre>\n<h3>\u6c42\u4f59\u8fd0\u7b97<\/h3>\n<pre><code>&gt; 11%3 2 <\/code><\/pre>\n<h2>\u5176\u4ed6<\/h2>\n<h3>Gitee Go \u6d41\u6c34\u7ebf<\/h3>\n<p>\u60ca\u559c\u53d1\u73b0 Gitee Go \u5f00\u901a\u540e\u83b7\u8d60\u4e86 1000 \u5206\u949f\u6784\u5efa\u65f6\u95f4\uff0c\u800c\u4e14\u975e\u5e38\u5e78\u8fd0\uff0c\u6784\u5efa\u73af\u5883\u7684 Python \u7248\u672c\u6b63\u597d\u652f\u6301\u672c\u9879\u76ee\u9700\u8981\u7684 3.7 \u3002\u5728\u65b0\u624b\u6a21\u677f\u57fa\u7840\u4e0a\u4f5c\u4e86\u4e00\u70b9\u4fee\u6539\uff0c\u8f83\u987a\u5229\u5730\u6dfb\u52a0\u4e86\u4e00\u4e2a\u8d39\u65f6\u5c11\u53c8\u8f83\u5173\u952e\u7684 unittest \u6d4b\u8bd5\u96c6\uff08\u786e\u8ba4\u8bed\u6cd5\u6811\u751f\u6210\u6b63\u786e\uff09\uff0c\u6302\u4ef6\u770b\u8d77\u6765\u4e0d\u9519\uff1a<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/11\/2020-11-01_\u6302\u4ef6.png\" alt=\"\u6728\u5170\u7f16\u7a0b\u8bed\u8a00 0.0.14.7\uff1a\u529f\u80fd\u8986\u76d6\u521d\u7248\u7528\u6237\u624b\u518c\uff1b Gitee Go \u6d41\u6c34\u7ebf\u5c1d\u9c9c\" \/><\/p>\n<p>[\u4f59\u4e0b\u89c1\u77e5\u4e4e\u539f\u6587\uff1a\u6728\u5170\u7f16\u7a0b\u8bed\u8a00 0.0.14.7\uff1a\u529f\u80fd\u8986\u76d6\u521d\u7248\u7528\u6237\u624b\u518c\uff1b Gitee Go \u6d41\u6c34\u7ebf\u5c1d\u9c9c]<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>0<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u6728\u5170\u7f16\u7a0b\u8bed\u8a00 0.0.14.7\uff1a\u529f&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\/185993"}],"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=185993"}],"version-history":[{"count":1,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/185993\/revisions"}],"predecessor-version":[{"id":185997,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/185993\/revisions\/185997"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=185993"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=185993"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=185993"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}