{"id":186007,"date":"2020-10-27T11:41:02","date_gmt":"2020-10-27T03:41:02","guid":{"rendered":"http:\/\/4563.org\/?p=186007"},"modified":"2020-11-06T01:35:04","modified_gmt":"2020-11-05T17:35:04","slug":"%e6%82%89%e6%95%b0-python-%e5%87%bd%e6%95%b0%e4%bc%a0%e5%8f%82%e7%9a%84%e8%af%ad%e6%b3%95%e7%b3%96","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=186007","title":{"rendered":"\u6089\u6570 Python \u51fd\u6570\u4f20\u53c2\u7684\u8bed\u6cd5\u7cd6"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u6089\u6570 Python \u51fd\u6570\u4f20\u53c2\u7684\u8bed\u6cd5\u7cd6               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : shawndev <\/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>TIOBE \u6392\u884c\u699c\u662f\u7a0b\u5e8f\u5f00\u53d1\u8bed\u8a00\u7684\u6d41\u884c\u4f7f\u7528\u7a0b\u5ea6\u7684\u6709\u6548\u6307\u6807\uff0c\u5bf9\u4e16\u754c\u8303\u56f4\u5185\u5f00\u53d1\u8bed\u8a00\u7684\u8d70\u52bf\u5177\u6709\u91cd\u8981\u53c2\u8003\u610f\u4e49\u3002\u968f\u7740\u6570\u636e\u6316\u6398\u3001\u673a\u5668\u5b66\u4e60\u548c\u4eba\u5de5\u667a\u80fd\u76f8\u5173\u6982\u5ff5\u7684\u98ce\u884c\uff0cPython \u4e00\u4e3e\u6536\u83b7 2018 \u5e74\u5e74\u5ea6\u8bed\u8a00\uff0c\u8fd9\u4e5f\u662f Python \u7ee7 2007 \u548c 2010 \u5e74\u4e4b\u540e\u7b2c\u4e09\u6b21\u95ee\u9f0e\u699c\u5355\u3002\u524d\u9635\u5b50\u5728 GitHub \u521b\u5efa Profile README \u65f6\u60ca\u89c9 Python \u662f\u6211\u7684\u7b2c\u4e8c\u9ad8\u9891\u8bed\u8a00\uff0c\u56de\u60f3\u7b2c\u4e00\u6b21\u89c1\u5230 positional only parameter \u4f20\u53c2\u65b9\u5f0f\u65f6\u4e00\u5934\u96fe\u6c34\u7684\u67e5\u627e\u8d44\u6599\uff0c\u501f\u7531\u5468\u672b\u95f2\u6687\uff0c\u5c06 Python \u51fd\u6570\u4f20\u53c2\u7684\u90e8\u5206\u8bed\u6cd5\u7cd6\u505a\u4e00\u6b21\u603b\u7ed3\u3002<\/p>\n<p>Python \u662f Guido van Rossum \uff08\u4ee5\u4e0b\u7b80\u79f0 GvR \uff09\u5728 1989 \u5e74\u5723\u8bde\u8282\u521b\u9020\u7684\u7f16\u7a0b\u8bed\u8a00\uff0c\u652f\u6301\u591a\u79cd\u7f16\u7a0b\u8303\u5f0f\uff0c1991 \u5e74\u5bf9\u5916\u53d1\u5e03\u4e86\u7b2c\u4e00\u4e2a\u7248\u672c\u3002\u968f\u540e\u7684 2000 \u5e74\u53d1\u5e03\u4e86 Python2\uff0c2008 \u5e74\u53d1\u5e03\u4e86\u4e0d\u5b8c\u5168\u5411\u524d\u517c\u5bb9\u7684 Python3\uff0cPython \u8bed\u8a00\u76ee\u524d\u7531 Python \u57fa\u91d1\u4f1a\u8fdb\u884c\u7ef4\u62a4\uff0c2020 \u5e74 1 \u6708 1 \u65e5 Python2 \u6b63\u5f0f\u843d\u5e55\uff0c\u56e0\u6b64\u672c\u6587\u6240\u8ff0\u5185\u5bb9\u5747\u57fa\u4e8e Python3 \u3002<\/p>\n<p>\u5728 Python \u4e2d\u5c06\u9762\u5411\u8fc7\u7a0b\u65b9\u5f0f\u58f0\u660e\u7684\u51fd\u6570\uff08\u5373\u4e0d\u5f52\u5c5e\u4e8e\u7c7b\uff09\u79f0\u4e3a\u51fd\u6570\uff08 function \uff09\uff0c\u800c\u9762\u5411\u5bf9\u8c61\u65b9\u5f0f\u58f0\u660e\u7684\u51fd\u6570\u79f0\u4e3a\u65b9\u6cd5\uff08 method \uff09\u3002<\/p>\n<p>\u8bed\u6cd5\u7cd6 1\uff1a<\/p>\n<p>\u5b9e\u4f8b\u65b9\u6cd5\u7b2c\u4e00\u4e2a\u53c2\u6570\u9ed8\u8ba4\u4e3a\u5f53\u524d\u5b9e\u4f8b\u5bf9\u8c61\uff0c\u7c7b\u65b9\u6cd5\u7b2c\u4e00\u4e2a\u53c2\u6570\u9ed8\u8ba4\u4e3a\u5f53\u524d\u7c7b\u5bf9\u8c61\uff0c\u9759\u6001\u65b9\u6cd5\u6ca1\u6709\u8be5\u7ea6\u675f\u3002<\/p>\n<pre><code># \u51fd\u6570 def greeting():   print(\"function\")  class Human:   # \u5b9e\u4f8b\u65b9\u6cd5   def greeting(self):     print(\"instance method\")      # \u7c7b\u65b9\u6cd5   @classmethod   def write(cls):     print(\"class method\")      # \u9759\u6001\u65b9\u6cd5     @staticmethod   def read():     print(\"static method\") <\/code><\/pre>\n<p>\u8bed\u6cd5\u7cd6 2\uff1a<\/p>\n<p>\u53c2\u6570\u53ef\u4ee5\u5177\u5907\u9ed8\u8ba4\u503c\uff0c\u5bf9\u6bd4 Objective-C \u7531\u4e8e\u8fd9\u9879\u7279\u6027\u7684\u7f3a\u5931\u9700\u8981\u5b9e\u73b0\u6784\u9020\u65b9\u6cd5\u548c\u4fbf\u5229\u6784\u9020\u65b9\u6cd5\u3002<\/p>\n<pre><code>def greeting(name = \"Jack Ma\"):   print(\"Hello\", name)    &gt;&gt;&gt; greeting() Hello Jack Ma &gt;&gt;&gt; greeting(\"Pony Ma\") Hello Pony Ma <\/code><\/pre>\n<p>\u8bed\u6cd5\u7cd6 3\uff1a<\/p>\n<p>\u901a\u8fc7*args \u8868\u793a\u53ef\u53d8\u53c2\u6570\u3002<\/p>\n<pre><code>def calc(name, *args):   spent = 0   for v in args:     spent += v   print(name, \"spent money:\", spent)    &gt;&gt;&gt; calc(\"Jack Ma\", 1000000, 2000000) Jack Ma spent money: 3000000 <\/code><\/pre>\n<p>\u4f20\u5165\u7684\u53c2\u6570\u901a\u8fc7 type(args)\u53ef\u4ee5\u68c0\u67e5\u7c7b\u578b\u4e3a\u5143\u7ec4\uff08 tuple \uff09\uff0c\u9664\u4e86\u51fd\u6570\u58f0\u660e\u5916\u51fd\u6570\u8c03\u7528\u4ea6\u7136\u3002<\/p>\n<pre><code>&gt;&gt;&gt; args = (1000000, 2000000, 3000000) # [1, 2, 3]\u540c\u7406 &gt;&gt;&gt; calc(\"Jack Ma\", *args) Jack Ma spent money: 6000000 <\/code><\/pre>\n<p>\u901a\u8fc7**kwargs \u4ee5\u952e\u503c\u5bf9\u7684\u5f62\u5f0f\u8868\u793a\u53ef\u53d8\u53c2\u6570\u3002<\/p>\n<pre><code>def calc(name, **kwargs):   spent = name + \" spent on:\"   for k, v in kwargs.items():     spent += \"%s=%s,\" % (k, v)   print(spent)  &gt;&gt;&gt; calc(\"Jack Ma\", eating=10000, shopping=20000) Jack Ma spent on:eating=10000,shopping=20000 <\/code><\/pre>\n<p>\u540c\u7406\uff0c\u51fd\u6570\u8c03\u7528\u4ea6\u7136\u3002<\/p>\n<pre><code>&gt;&gt;&gt; kwargs = {\"eating\":10000, \"shopping\":20000} &gt;&gt;&gt; calc(\"Jack Ma\", **kwargs) Jack Ma spent on:eating=10000,shopping=20000 <\/code><\/pre>\n<p>\u81ea Python1 \u8d77\u5c31\u652f\u6301\u901a\u8fc7\u4f4d\u7f6e\u548c\u53c2\u6570\u540d\u79f0\u4e24\u79cd\u65b9\u5f0f\u4f20\u9012\u53c2\u6570\uff0c\u5982\u5bf9\u4e8e\u539f\u578b\u4e3a def add(x, y)\u7684\u51fd\u6570\uff0c\u540c\u65f6\u652f\u6301\u4ee5\u4e0b\u4e24\u79cd\u8c03\u7528\u65b9\u5f0f\u3002<\/p>\n<pre><code>add(1, 2) add(x=1, y=2) <\/code><\/pre>\n<p>\u8bed\u6cd5\u7cd6 4\uff1a<\/p>\n<p>Keyword-Only Arguments (PEP-3012)<\/p>\n<p>\u51fd\u6570\u58f0\u660e\u65f6\uff0c\u53c2\u6570\u5217\u8868\u4e2d\u5355\u72ec\u7684*\u8868\u793a\u5728\u6b64\u4e4b\u540e\u7684\u53c2\u6570\u4ec5\u652f\u6301\u901a\u8fc7\u540d\u79f0\u8fdb\u884c\u4f20\u9012\u3002\u901a\u8fc7\u8fd9\u4e2a\u8bed\u6cd5\u53ef\u4ee5\u5728\u53ef\u53d8\u53c2\u6570\u5217\u8868\u4e4b\u540e\u4f20\u9012\u5176\u4ed6\u53c2\u6570\u3002<\/p>\n<pre><code>def compare(a, b, *, key=None):   pass    &gt;&gt;&gt; compare(1, 2, 3) # \u8c03\u7528\u5931\u8d25 Traceback (most recent call last):   File \"&lt;stdin&gt;\", line 1, in &lt;module&gt; TypeError: compare() takes 2 positional arguments but 3 were given &gt;&gt;&gt; compare(1, 2, key=3) # \u8c03\u7528\u6210\u529f <\/code><\/pre>\n<p>\u8bed\u6cd5\u7cd6 5:<\/p>\n<p>Positional-Only Parameters (PEP-570)<\/p>\n<p>\u51fd\u6570\u58f0\u660e\u65f6\uff0c\u53c2\u6570\u5217\u8868\u4e2d\u5355\u72ec\u7684 \/\u8868\u793a\u5728\u6b64\u4e4b\u524d\u7684\u53c2\u6570\u4ec5\u652f\u6301\u901a\u8fc7\u4f4d\u7f6e\u8fdb\u884c\u4f20\u9012\u3002\u8fd9\u4e2a\u8bed\u6cd5\u4e3b\u8981\u89e3\u51b3\u90e8\u5206\u51fd\u6570\u7684\u53c2\u6570\u6ca1\u6709\u5b9e\u9645\u610f\u4e49\uff0c\u540e\u7eed\u53ef\u80fd\u4f1a\u8fdb\u884c\u4fee\u6539\uff0c\u907f\u514d\u901a\u8fc7\u540d\u79f0\u4f20\u9012\u53c2\u6570\u5728\u540d\u79f0\u4fee\u6539\u540e\u5931\u6548\u3002\u6bd4\u5982 int(x=&#8221;1&#8243;)\u4e2d x \u5e76\u6ca1\u6709\u5b9e\u9645\u610f\u4e49\uff0c\u800c\u4e14\u76f8\u6bd4 int(&#8220;1&#8221;)\u53ef\u8bfb\u6027\u6709\u6240\u4e0d\u8db3\u3002<\/p>\n<pre><code>def name(positional_only_parameters, \/, positional_or_keyword_parameters,          *, keyword_only_parameters):   pass <\/code><\/pre>\n<p>\u6b64\u5916\uff0c\u5b98\u65b9\u6587\u6863\u8868\u8ff0\u8fd9\u4e2a\u8bed\u6cd5\u8fd8\u89e3\u51b3\u4e86\u67d0\u4e2a\u8fb9\u754c\u6761\u4ef6\u4e0b\u7684\u8c03\u7528\u5931\u8d25\u3002\u5bf9\u4e8e\u4ee5\u4e0b\u51fd\u6570\uff1a<\/p>\n<pre><code>def foo(name, **kwargs):     return 'name' in kwargs <\/code><\/pre>\n<p>\u5f53\u6211\u4eec\u4f20\u9012\u7684 kwargs \u62e5\u6709\u4e00\u4e2a&#8221;name&#8221;\u7684 key \u65f6\u4f1a\u8c03\u7528\u5931\u8d25\uff0c\u5982\u4e0b\u3002<\/p>\n<pre><code>&gt;&gt;&gt; foo(1, **{'name': 2}) Traceback (most recent call last):   File \"&lt;stdin&gt;\", line 1, in &lt;module&gt; TypeError: foo() got multiple values for argument 'name' <\/code><\/pre>\n<p>\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u53ef\u4ee5\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\u3002<\/p>\n<pre><code>def foo(name, \/, **kwargs):     return 'name' in kwargs <\/code><\/pre>\n<p>\u8bed\u6cd5\u7cd6 6\uff1a<\/p>\n<p>\u5982\u4f55\u4fee\u6539\u53c2\u6570\u7684\u5f15\u7528\uff0c\u5b98\u65b9\u6587\u6863\u89e3\u91ca\u79f0\uff1aPython \u4e2d\u53c2\u6570\u7684\u4f20\u9012\u901a\u8fc7\u503c\u4f20\u9012\uff08\u4f46\u5f15\u7528\u662f\u901a\u8fc7\u503c\u4f20\u9012\u7684\uff0c\u53c2\u8003\u94fe\u63a5 2 \uff09\uff0c\u6700\u7b80\u5355\u7684\u65b9\u5f0f\u662f\u5c06\u5165\u53c2\u6309\u987a\u5e8f\u4ee5\u5143\u7ec4\u8fdb\u884c\u8fd4\u56de\u3002<\/p>\n<ul>\n<li>\n<p>https:\/\/docs.python.org\/zh-cn\/3\/faq\/programming.html#how-do-i-write-a-function-with-output-parameters-call-by-reference<\/p>\n<\/li>\n<li>\n<p>https:\/\/stackoverflow.com\/questions\/986006\/how-do-i-pass-a-variable-by-reference<\/p>\n<\/li>\n<\/ul>\n<p>\u8bed\u6cd5\u7cd6 7\uff1a<\/p>\n<p>\u7531\u4e8e Python \u7684 first-class function \u7279\u6027\uff0c\u51fd\u6570\u4f5c\u4e3a\u4e00\u7b49\u516c\u6c11\u53ef\u4ee5\u50cf\u5176\u4ed6\u7c7b\u578b\u4e00\u6837\u8fdb\u884c\u4f20\u9012\u548c\u8d4b\u503c\u3002\u6bd4\u5982 max \u51fd\u6570\u539f\u578b\u53ef\u4ee5\u4f20\u5165\u4e00\u4e2a\u7528\u4e8e\u6bd4\u8f83\u7684\u51fd\u6570\uff0c\u5f53\u7136\u51fd\u6570\u4e5f\u53ef\u4ee5\u88ab\u91cd\u65b0\u8d4b\u503c\u3002<\/p>\n<pre><code>&gt;&gt;&gt; max=min &gt;&gt;&gt; max(19,9) 9 <\/code><\/pre>\n<p>\u5168\u5c40\u51fd\u6570\u548c\u5173\u952e\u5b57\u6709\u65f6\u5019\u4f1a\u4e0d\u6613\u5206\u8fa8\uff0c\u6bd4\u5982 print \u5728 Python2 \u4e2d\u662f\u5173\u952e\u5b57\uff0c\u800c\u5728 Python3 \u4e2d\u662f\u5185\u7f6e\u51fd\u6570\u3002\u53ef\u4ee5\u901a\u8fc7\u4e0b\u5217\u65b9\u5f0f\u83b7\u53d6\u5173\u952e\u5b57\u5217\u8868\u3002<\/p>\n<pre><code>&gt;&gt;&gt; import keyword &gt;&gt;&gt; keyword.kwlist ['False', 'None', 'True', 'and', 'as', 'assert', 'async', 'await', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'finally', 'for', 'from', 'global', 'if', 'import', 'in', 'is', 'lambda', 'nonlocal', 'not', 'or', 'pass', 'raise', 'return', 'try', 'while', 'with', 'yield'] <\/code><\/pre>\n<p>\u8bed\u6cd5\u7cd6 8\uff1a<\/p>\n<p>\u7c7b\u578b\u6807\u6ce8\uff08 Type Hint \uff09\u901a\u8fc7:type \u8868\u793a\u53c2\u6570\u7c7b\u578b\uff0c\u7531\u4e8e Python \u52a8\u6001\u7c7b\u578b\u7684\u7279\u6027 Python \u8fd0\u884c\u65f6\u5e76\u4e0d\u5f3a\u5236\u6807\u6ce8\u51fd\u6570\u548c\u53d8\u91cf\u7c7b\u578b\uff0c\u7c7b\u578b\u6807\u6ce8\u53ef\u88ab\u7528\u4e8e IDE \u7b49\u7b2c\u4e09\u65b9\u5de5\u5177\u3002\u5982\u4e0b\uff1a<\/p>\n<pre><code>def greeting(name: str) -&gt; str:     return 'Hello ' + name <\/code><\/pre>\n<p>\u8be6\u7ec6\u5185\u5bb9\u53ef\u4ee5\u53c2\u8003\u5b98\u65b9\u4e2d\u6587\u6587\u6863\uff1a<\/p>\n<ul>\n<li>https:\/\/docs.python.org\/zh-cn\/3\/library\/typing.html<\/li>\n<\/ul>\n<p>\u56de\u60f3\u7b2c\u4e00\u6b21\u5728 Python \u4f5c\u8005 GvR \u7684 500-lines-of-code \u4e2d\u89c1\u5230 Keyword-Only Arguments \u7684\u7528\u6cd5\u51e0\u5ea6\u65e0\u6cd5\u7406\u89e3\u4ee3\u7801\u4e3a\u4ec0\u4e48\u80fd\u591f\u6b63\u5e38\u8fd0\u884c\uff0c\u987a\u4fbf\u4e00\u63d0\uff0c\u8be5\u9879\u76ee\u540c\u65f6\u4e5f\u662f\u7edd\u4f73\u7684\u7f16\u7a0b\u5b66\u4e60\u6750\u6599\u3002<\/p>\n<p>\u884c\u6587\u81f3\u6b64\u8bed\u6cd5\u7cd6\u7684\u6570\u91cf\u8d85\u51fa\u4e86\u6211\u7684\u9884\u671f\uff0c\u672c\u7bc7\u6587\u7ae0\u521b\u4f5c\u671f\u95f4\u6211\u60ca\u559c\u7684\u53d1\u73b0\u5b98\u65b9\u5df2\u7ecf\u5ba3\u544a\u4e86 Python2 \u7684\u843d\u5e55\uff0c\u5b98\u65b9\u6587\u6863\u63d0\u4f9b\u4e86\u7b80\u4f53\u4e2d\u6587\u7248\u672c\uff0c\u800c Python \u4e5f\u5df2\u7ecf\u53d1\u5e03\u4e86 3.9 \u7248\u672c\uff0c\u88ab\u79f0\u4e3a BDFL \u7684 GvR \u4e5f\u5728 2018 \u5e74\u901a\u8fc7\u90ae\u4ef6\u7ec4\u5ba3\u5e03\u4e86\u6743\u529b\u7684\u4ea4\u63a5\u3002<\/p>\n<p>\u901a\u8fc7 TIOBE \u957f\u671f\u699c\u5355\u53d8\u5316\u53ef\u4ee5\u53d1\u73b0\uff0cPython \u4f5c\u4e3a\u8fd9\u4e2a\u699c\u5355\u7684\u5e38\u9752\u6811\u4e14\u4ecd\u7136\u4fdd\u6301\u7740\u4e0a\u5347\u8d8b\u52bf\uff0c\u8eab\u8fb9\u4e5f\u6709\u4e0d\u5c11\u4eba\u81ea\u5b66\u8fd9\u95e8\u8bed\u8a00\u3002\u6587\u7ae0\u7684\u6700\u540e\u6458\u5f55 Python \u4e4b\u7985\u4e0e\u5404\u4f4d\u5171\u52c9\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/11\/b07128d10b0547f5b72c55bb6eae28d2tplv-k3u1fbpfcp-zoom-1.image_.png\" alt=\"\u6089\u6570 Python \u51fd\u6570\u4f20\u53c2\u7684\u8bed\u6cd5\u7cd6\" \/><\/p>\n<pre><code>&gt;&gt;&gt; python3 &gt;&gt;&gt; import this The Zen of Python, by Tim Peters  Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Flat is better than nested. Sparse is better than dense. Readability counts. Special cases aren't special enough to break the rules. Although practicality beats purity. Errors should never pass silently. Unless explicitly silenced. In the face of ambiguity, refuse the temptation to guess. There should be one-- and preferably only one --obvious way to do it. Although that way may not be obvious at first unless you're Dutch. Now is better than never. Although never is often better than *right* now. If the implementation is hard to explain, it's a bad idea. If the implementation is easy to explain, it may be a good idea. Namespaces are one honking great idea -- let's do more of those! <\/code><\/pre>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>8<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"4014829\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : shawndev <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u521b\u4f5c\u4e0d\u6613\uff0c\u5982\u679c\u5185\u5bb9\u5bf9\u4f60\u6709\u5e2e\u52a9\uff0c\u6b22\u8fce\u5173\u6ce8\u6211\u7684\u4e2a\u4eba\u516c\u4f17\u53f7\u6668\u6653(chenxiaopost)\u6216\u7559\u4e0b\u4f60\u7684\u8bc4\u8bba\u3002\u81f4\u529b\u4e8e\u6210\u4e3a\u4e00\u4e2a\u4e5f\u8bb8\u6709\u6599\u4e5f\u6709\u8da3\u7684\u521b\u4f5c\u8005\uff0c\u5199\u4ee3\u7801\uff0c\u4e5f\u5199\u6587\u5b57\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4014830\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : GeekBao <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8c22\u8c22\u5206\u4eab, \u5df2\u5173\u6ce8. <br \/>\u5c45\u7136\u662f\u90d1\u5dde\u7684\u670b\u53cb.                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4014831\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : shawndev <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @GeekBao \u8c22\u8c22\u8bc4\u8bba\uff0c\u5c45\u7136\u662f\u90d1\u5dde\u7684\u670b\u53cb\uff08\u4e92\u8054\u7f51\u8352\u6f20\u540d\u4e0d\u865a\u4f20                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4014832\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : no1xsyzy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             1 4 5 \u662f\u8bed\u6cd5\u76d0<br \/>7 \u4e0e\u8bed\u6cd5\u65e0\u5173                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4014833\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : binux <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4f60\u662f\u4e0d\u662f\u5bf9\u8bed\u6cd5\u7cd6\u8fd9\u4e2a\u8bcd\u6709\u4ec0\u4e48\u8bef\u89e3\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4014834\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : shawndev <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @no1xsyzy \u662f\u7684\uff0c\u56e0\u4e3a python \u662f\u4e00\u4e2a\u51dd\u7ec3\u7684\u8bed\u8a00\uff0c\u6240\u4ee5\u5176\u4ed6\u8bed\u8a00\u4e5f\u8bb8\u4e0d\u5177\u5907\u7684 tricky \u7528\u6cd5\u6211\u90fd\u6309\u7167\u8bed\u6cd5\u7cd6\u8fdb\u884c\u5f52\u7c7b\u4e86\u3002\u611f\u8c22\u60a8\u7684\u6307\u70b9\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4014835\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : shawndev <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @binux #6 \u7684\u8bc4\u8bba\u80fd\u5426\u89e3\u7b54\u60a8\u7684\u95ee\u9898\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4014836\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : deplives <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6211\u89c9\u5f97\u4f60\u5bf9 &#8220;\u8bed\u6cd5\u7cd6&#8221; \u8fd9\u4e2a\u6982\u5ff5\u6709\u70b9\u8bef\u89e3\uff0c\u4e0a\u5df2\u7ecf\u6709\u4eba\u8bf4\u5230\u4e86\uff0c\u4f46\u4f60\u7684\u56de\u7b54\u6838\u5fc3\u5728\u4e8e &#8220;\u81ea\u5df1\u603b\u7ed3\u4e86\u4e00\u5957\u6240\u8c13\u7684\u8bed\u6cd5\u7cd6\u7684\u6982\u5ff5&#8221;\u3002 \u4f60\u53ef\u4ee5\u53bb wiki \u4e0a\u641c\u4e00\u4e0b Syntactic_sugar \u4e86\u89e3\u4e0b\u5565\u53eb\u8bed\u6cd5\u7cd6                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u6089\u6570 Python \u51fd\u6570\u4f20\u53c2\u7684\u8bed\u6cd5&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\/186007"}],"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=186007"}],"version-history":[{"count":1,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/186007\/revisions"}],"predecessor-version":[{"id":186009,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/186007\/revisions\/186009"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=186007"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=186007"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=186007"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}