{"id":1080731,"date":"2025-01-08T12:32:54","date_gmt":"2025-01-08T04:32:54","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1080731.html"},"modified":"2025-01-08T12:32:56","modified_gmt":"2025-01-08T04:32:56","slug":"%e5%a6%82%e4%bd%95%e8%ae%a9%e8%bf%94%e5%9b%9e%e5%80%bc%e4%b8%8d%e6%98%be%e7%a4%bapython-2","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1080731.html","title":{"rendered":"\u5982\u4f55\u8ba9\u8fd4\u56de\u503c\u4e0d\u663e\u793apython"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24183126\/c77eeab1-ed74-4b76-8cbe-971283b72e03.webp\" alt=\"\u5982\u4f55\u8ba9\u8fd4\u56de\u503c\u4e0d\u663e\u793apython\" \/><\/p>\n<p><p> <strong>\u5728Python\u4e2d\u8ba9\u8fd4\u56de\u503c\u4e0d\u663e\u793a\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u51e0\u79cd\u65b9\u6cd5\uff1a\u4f7f\u7528\u5206\u53f7\u3001\u5c06\u8fd4\u56de\u503c\u8d4b\u503c\u7ed9\u4e00\u4e2a\u53d8\u91cf\u3001\u4f7f\u7528<code>_<\/code>\u5360\u4f4d\u7b26\u3001\u4f7f\u7528<code>pass<\/code>\u8bed\u53e5<\/strong>\u3002\u5176\u4e2d\uff0c\u6700\u5e38\u7528\u7684\u65b9\u6cd5\u662f\u5728\u8bed\u53e5\u672b\u5c3e\u52a0\u4e0a\u5206\u53f7\uff0c\u8fd9\u6837\u53ef\u4ee5\u6709\u6548\u5730\u9632\u6b62\u5728\u4ea4\u4e92\u5f0f\u89e3\u91ca\u5668\u4e2d\u8f93\u51fa\u8fd4\u56de\u503c\u3002<\/p>\n<\/p>\n<p><p><strong>\u4f7f\u7528\u5206\u53f7<\/strong>\uff1a\u5728Python\u4e2d\uff0c\u5206\u53f7\u7528\u6765\u5206\u9694\u591a\u4e2a\u8bed\u53e5\u3002\u5982\u679c\u5728\u4e00\u4e2a\u8bed\u53e5\u7684\u672b\u5c3e\u52a0\u4e0a\u5206\u53f7\uff0c\u89e3\u91ca\u5668\u5c31\u4e0d\u4f1a\u663e\u793a\u8be5\u8bed\u53e5\u7684\u8fd4\u56de\u503c\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">result = 5 + 3;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u6837\u5728\u4ea4\u4e92\u5f0f\u89e3\u91ca\u5668\u4e2d\u5c31\u4e0d\u4f1a\u663e\u793a<code>8<\/code>\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u4f7f\u7528\u5206\u53f7<\/p>\n<\/p>\n<p><p>\u5728\u4ea4\u4e92\u5f0f\u89e3\u91ca\u5668\u4e2d\u8f93\u5165\u4e00\u884c\u4ee3\u7801\u65f6\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u4f1a\u663e\u793a\u8be5\u4ee3\u7801\u7684\u8fd4\u56de\u503c\u3002\u5982\u679c\u5728\u4ee3\u7801\u7684\u672b\u5c3e\u52a0\u4e0a\u5206\u53f7\uff0c\u5219\u4e0d\u4f1a\u663e\u793a\u8fd4\u56de\u503c\u3002\u8fd9\u4e2a\u6280\u5de7\u975e\u5e38\u7b80\u5355\uff0c\u4f46\u5374\u975e\u5e38\u6709\u6548\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">&gt;&gt;&gt; 5 + 3;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u89e3\u91ca\u5668\u4e0d\u4f1a\u663e\u793a\u4efb\u4f55\u8f93\u51fa\u3002\u5206\u53f7\u5728Python\u4e2d\u8fd8\u6709\u5176\u4ed6\u7528\u9014\uff0c\u6bd4\u5982\u5728\u540c\u4e00\u884c\u4e2d\u5206\u9694\u591a\u4e2a\u8bed\u53e5\uff0c\u4f46\u5728\u8fd9\u4e2a\u573a\u666f\u4e2d\uff0c\u5b83\u7684\u4f5c\u7528\u662f\u6291\u5236\u8f93\u51fa\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001\u5c06\u8fd4\u56de\u503c\u8d4b\u503c\u7ed9\u4e00\u4e2a\u53d8\u91cf<\/p>\n<\/p>\n<p><p>\u53e6\u4e00\u79cd\u65b9\u6cd5\u662f\u5c06\u8fd4\u56de\u503c\u8d4b\u503c\u7ed9\u4e00\u4e2a\u53d8\u91cf\uff0c\u8fd9\u6837\u89e3\u91ca\u5668\u53ea\u4f1a\u663e\u793a\u53d8\u91cf\u540d\uff0c\u800c\u4e0d\u662f\u8fd4\u56de\u503c\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">result = 5 + 3<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u89e3\u91ca\u5668\u4e0d\u4f1a\u663e\u793a\u4efb\u4f55\u8f93\u51fa\uff0c\u9664\u975e\u4f60\u663e\u5f0f\u5730\u8f93\u5165\u53d8\u91cf\u540d<code>result<\/code>\u3002\u8fd9\u4e0d\u4ec5\u53ef\u4ee5\u9632\u6b62\u8fd4\u56de\u503c\u88ab\u663e\u793a\uff0c\u8fd8\u53ef\u4ee5\u65b9\u4fbf\u5730\u5728\u540e\u7eed\u7684\u4ee3\u7801\u4e2d\u4f7f\u7528\u8be5\u8fd4\u56de\u503c\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001\u4f7f\u7528\u5360\u4f4d\u7b26<\/p>\n<\/p>\n<p><p>\u5728\u4ea4\u4e92\u5f0f\u89e3\u91ca\u5668\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>_<\/code>\u4f5c\u4e3a\u5360\u4f4d\u7b26\u6765\u63a5\u6536\u4e0a\u4e00\u6b21\u8868\u8fbe\u5f0f\u7684\u7ed3\u679c\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">_ = 5 + 3<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u6837\u89e3\u91ca\u5668\u4e5f\u4e0d\u4f1a\u663e\u793a\u4efb\u4f55\u8f93\u51fa\uff0c\u56e0\u4e3a\u7ed3\u679c\u88ab\u8d4b\u503c\u7ed9\u4e86\u5360\u4f4d\u7b26<code>_<\/code>\u3002\u8fd9\u4e2a\u6280\u5de7\u5728\u5904\u7406\u4e34\u65f6\u53d8\u91cf\u65f6\u975e\u5e38\u6709\u7528\uff0c\u4f46\u8981\u6ce8\u610f\u4e0d\u8981\u8986\u76d6\u6709\u610f\u4e49\u7684\u6570\u636e\u3002<\/p>\n<\/p>\n<p><p>\u56db\u3001\u4f7f\u7528<code>pass<\/code>\u8bed\u53e5<\/p>\n<\/p>\n<p><p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u4f60\u53ef\u80fd\u9700\u8981\u4e00\u4e2a\u5360\u4f4d\u7b26\u8bed\u53e5\uff0c\u8fd9\u65f6\u53ef\u4ee5\u4f7f\u7528<code>pass<\/code>\u3002<code>pass<\/code>\u8bed\u53e5\u4e0d\u6267\u884c\u4efb\u4f55\u64cd\u4f5c\uff0c\u4f46\u5b83\u662f\u5408\u6cd5\u7684\u8bed\u53e5\uff0c\u53ef\u4ee5\u7528\u6765\u586b\u5145\u8bed\u6cd5\u4e0a\u9700\u8981\u8bed\u53e5\u7684\u5730\u65b9\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">for i in range(5):<\/p>\n<p>    pass<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c<code>pass<\/code>\u8bed\u53e5\u4f7f\u5f97\u5faa\u73af\u4f53\u5408\u6cd5\u4f46\u4e0d\u6267\u884c\u4efb\u4f55\u64cd\u4f5c\uff0c\u56e0\u800c\u4e0d\u4f1a\u6709\u4efb\u4f55\u8f93\u51fa\u3002<\/p>\n<\/p>\n<p><p>\u4e94\u3001\u4f7f\u7528\u4e0a\u4e0b\u6587\u7ba1\u7406\u5668<\/p>\n<\/p>\n<p><p>\u4f7f\u7528\u4e0a\u4e0b\u6587\u7ba1\u7406\u5668\uff08\u5982<code>contextlib.redirect_stdout<\/code>\uff09\u53ef\u4ee5\u91cd\u5b9a\u5411\u6807\u51c6\u8f93\u51fa\uff0c\u4ece\u800c\u6291\u5236\u8fd4\u56de\u503c\u7684\u663e\u793a\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import contextlib<\/p>\n<p>import io<\/p>\n<p>f = io.StringIO()<\/p>\n<p>with contextlib.redirect_stdout(f):<\/p>\n<p>    result = 5 + 3<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u6837\u53ef\u4ee5\u786e\u4fdd\u5728\u4e0a\u4e0b\u6587\u7ba1\u7406\u5668\u7684\u4f5c\u7528\u8303\u56f4\u5185\uff0c\u6240\u6709\u7684\u6807\u51c6\u8f93\u51fa\u90fd\u88ab\u91cd\u5b9a\u5411\u5230<code>StringIO<\/code>\u5bf9\u8c61<code>f<\/code>\uff0c\u4ece\u800c\u907f\u514d\u663e\u793a\u8fd4\u56de\u503c\u3002<\/p>\n<\/p>\n<p><p>\u516d\u3001\u901a\u8fc7\u81ea\u5b9a\u4e49\u51fd\u6570<\/p>\n<\/p>\n<p><p>\u4f60\u8fd8\u53ef\u4ee5\u901a\u8fc7\u7f16\u5199\u81ea\u5b9a\u4e49\u51fd\u6570\u6765\u6291\u5236\u8fd4\u56de\u503c\u7684\u663e\u793a\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def silent_function():<\/p>\n<p>    result = 5 + 3<\/p>\n<p>    return None<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u51fd\u6570<code>silent_function<\/code>\u7684\u8fd4\u56de\u503c\u662f<code>None<\/code>\uff0c\u56e0\u6b64\u8c03\u7528\u5b83\u4e0d\u4f1a\u663e\u793a\u4efb\u4f55\u6709\u610f\u4e49\u7684\u8f93\u51fa\u3002<\/p>\n<\/p>\n<p><p>\u4e03\u3001\u4f7f\u7528<code>sys.stdout<\/code>\u91cd\u5b9a\u5411<\/p>\n<\/p>\n<p><p>\u4f60\u4e5f\u53ef\u4ee5\u901a\u8fc7\u91cd\u5b9a\u5411<code>sys.stdout<\/code>\u6765\u6291\u5236\u8fd4\u56de\u503c\u7684\u663e\u793a\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import sys<\/p>\n<p>import os<\/p>\n<p>sys.stdout = open(os.devnull, &#39;w&#39;)<\/p>\n<p>result = 5 + 3<\/p>\n<p>sys.stdout = sys.__stdout__<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u6807\u51c6\u8f93\u51fa\u88ab\u91cd\u5b9a\u5411\u5230<code>\/dev\/null<\/code>\uff0c\u4ece\u800c\u6291\u5236\u4efb\u4f55\u8f93\u51fa\u3002\u5b8c\u6210\u64cd\u4f5c\u540e\uff0c\u5c06\u6807\u51c6\u8f93\u51fa\u6062\u590d\u5230\u9ed8\u8ba4\u72b6\u6001\u3002<\/p>\n<\/p>\n<p><p>\u516b\u3001\u4f7f\u7528<code>__repr__<\/code>\u548c<code>__str__<\/code>\u65b9\u6cd5<\/p>\n<\/p>\n<p><p>\u5982\u679c\u4f60\u5b9a\u4e49\u4e86\u4e00\u4e2a\u7c7b\uff0c\u53ef\u4ee5\u901a\u8fc7\u81ea\u5b9a\u4e49\u5176<code>__repr__<\/code>\u548c<code>__str__<\/code>\u65b9\u6cd5\u6765\u63a7\u5236\u8fd4\u56de\u503c\u7684\u663e\u793a\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">class SilentClass:<\/p>\n<p>    def __repr__(self):<\/p>\n<p>        return &#39;&#39;<\/p>\n<p>obj = SilentClass()<\/p>\n<p>obj<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u8c03\u7528\u5bf9\u8c61<code>obj<\/code>\u4e0d\u4f1a\u663e\u793a\u4efb\u4f55\u8f93\u51fa\uff0c\u56e0\u4e3a\u5176<code>__repr__<\/code>\u65b9\u6cd5\u8fd4\u56de\u4e00\u4e2a\u7a7a\u5b57\u7b26\u4e32\u3002<\/p>\n<\/p>\n<p><p>\u4e5d\u3001\u4f7f\u7528<code>eval<\/code>\u548c<code>exec<\/code>\u51fd\u6570<\/p>\n<\/p>\n<p><p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528<code>eval<\/code>\u548c<code>exec<\/code>\u51fd\u6570\u6765\u52a8\u6001\u6267\u884c\u4ee3\u7801\uff0c\u5e76\u63a7\u5236\u8fd4\u56de\u503c\u7684\u663e\u793a\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">eval(&#39;5 + 3&#39;)<\/p>\n<p>exec(&#39;result = 5 + 3&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e24\u4e2a\u4f8b\u5b50\u4e2d\uff0c<code>eval<\/code>\u548c<code>exec<\/code>\u4e0d\u4f1a\u663e\u793a\u4efb\u4f55\u8f93\u51fa\uff0c\u56e0\u4e3a\u5b83\u4eec\u7684\u8fd4\u56de\u503c\u6ca1\u6709\u88ab\u663e\u5f0f\u5730\u6253\u5370\u51fa\u6765\u3002<\/p>\n<\/p>\n<p><p>\u5341\u3001\u4f7f\u7528\u51fd\u6570\u88c5\u9970\u5668<\/p>\n<\/p>\n<p><p>\u4f60\u8fd8\u53ef\u4ee5\u4f7f\u7528\u51fd\u6570\u88c5\u9970\u5668\u6765\u6291\u5236\u8fd4\u56de\u503c\u7684\u663e\u793a\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def silent_decorator(func):<\/p>\n<p>    def wrapper(*args, kwargs):<\/p>\n<p>        result = func(*args, kwargs)<\/p>\n<p>        return None<\/p>\n<p>    return wrapper<\/p>\n<p>@silent_decorator<\/p>\n<p>def add(a, b):<\/p>\n<p>    return a + b<\/p>\n<p>add(5, 3)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u88c5\u9970\u5668<code>silent_decorator<\/code>\u4f7f\u5f97\u51fd\u6570<code>add<\/code>\u7684\u8fd4\u56de\u503c\u88ab\u6291\u5236\uff0c\u4ece\u800c\u4e0d\u4f1a\u663e\u793a\u4efb\u4f55\u8f93\u51fa\u3002<\/p>\n<\/p>\n<p><p>\u603b\u4e4b\uff0c\u6709\u591a\u79cd\u65b9\u6cd5\u53ef\u4ee5\u5728Python\u4e2d\u6291\u5236\u8fd4\u56de\u503c\u7684\u663e\u793a\u3002\u6839\u636e\u5177\u4f53\u7684\u573a\u666f\u548c\u9700\u6c42\uff0c\u53ef\u4ee5\u9009\u62e9\u6700\u5408\u9002\u7684\u65b9\u6cd5\u6765\u5b9e\u73b0\u8fd9\u4e00\u76ee\u6807\u3002\u65e0\u8bba\u662f\u4f7f\u7528\u5206\u53f7\u3001\u5c06\u8fd4\u56de\u503c\u8d4b\u503c\u7ed9\u53d8\u91cf\u3001\u4f7f\u7528\u5360\u4f4d\u7b26\uff0c\u8fd8\u662f\u4f7f\u7528\u4e0a\u4e0b\u6587\u7ba1\u7406\u5668\u3001\u81ea\u5b9a\u4e49\u51fd\u6570\u7b49\uff0c\u90fd\u53ef\u4ee5\u6709\u6548\u5730\u9632\u6b62\u8fd4\u56de\u503c\u88ab\u663e\u793a\u3002\u901a\u8fc7\u7075\u6d3b\u8fd0\u7528\u8fd9\u4e9b\u6280\u5de7\uff0c\u53ef\u4ee5\u4f7f\u4ee3\u7801\u66f4\u52a0\u7b80\u6d01\u548c\u6613\u4e8e\u9605\u8bfb\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u9690\u85cf\u51fd\u6570\u7684\u8fd4\u56de\u503c\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u51fd\u6570\u7684\u8fd4\u56de\u503c\u901a\u5e38\u4f1a\u88ab\u8f93\u51fa\u5230\u63a7\u5236\u53f0\u3002\u5982\u679c\u5e0c\u671b\u9690\u85cf\u8fd9\u4e9b\u8fd4\u56de\u503c\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u65b9\u6cd5\uff1a\u53ef\u4ee5\u5c06\u51fd\u6570\u7684\u8fd4\u56de\u503c\u8d4b\u503c\u7ed9\u4e00\u4e2a\u53d8\u91cf\uff0c\u4f46\u4e0d\u5728\u63a7\u5236\u53f0\u8f93\u51fa\u8be5\u53d8\u91cf\u3002\u4e5f\u53ef\u4ee5\u5728\u51fd\u6570\u5185\u90e8\u4f7f\u7528<code>print()<\/code>\u51fd\u6570\u6765\u8f93\u51fa\u6240\u9700\u7684\u4fe1\u606f\uff0c\u800c\u4e0d\u8fd4\u56de\u5177\u4f53\u503c\u3002\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u8fd4\u56de\u503c\u4e0d\u4f1a\u5728\u5916\u90e8\u73af\u5883\u4e2d\u663e\u793a\u3002<\/p>\n<p><strong>\u4f7f\u7528Python\u7684\u4e0a\u4e0b\u6587\u7ba1\u7406\u5668\u6765\u5904\u7406\u8fd4\u56de\u503c\u5417\uff1f<\/strong><br \/>\u662f\u7684\uff0c\u53ef\u4ee5\u5229\u7528\u4e0a\u4e0b\u6587\u7ba1\u7406\u5668\u6765\u7ba1\u7406\u8d44\u6e90\u548c\u9690\u853d\u8fd4\u56de\u503c\u3002\u4f8b\u5982\uff0c\u4f7f\u7528<code>with<\/code>\u8bed\u53e5\u6765\u6267\u884c\u67d0\u4e9b\u64cd\u4f5c\uff0c\u800c\u4e0d\u76f4\u63a5\u8f93\u51fa\u5176\u7ed3\u679c\u3002\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u51fd\u6570\u7684\u8fd4\u56de\u503c\u4e0d\u4f1a\u88ab\u76f4\u63a5\u6253\u5370\u5230\u63a7\u5236\u53f0\uff0c\u800c\u662f\u53ef\u4ee5\u5728\u4e0a\u4e0b\u6587\u4e2d\u5b89\u5168\u5730\u5904\u7406\u3002<\/p>\n<p><strong>\u662f\u5426\u53ef\u4ee5\u4f7f\u7528\u65e5\u5fd7\u8bb0\u5f55\u6765\u4ee3\u66ff\u6253\u5370\u8fd4\u56de\u503c\uff1f<\/strong><br \/>\u5b8c\u5168\u53ef\u4ee5\u3002\u5728Python\u4e2d\uff0c\u4f7f\u7528<code>logging<\/code>\u6a21\u5757\u53ef\u4ee5\u8bb0\u5f55\u51fd\u6570\u7684\u8fd4\u56de\u503c\uff0c\u800c\u4e0d\u662f\u76f4\u63a5\u6253\u5370\u5230\u63a7\u5236\u53f0\u3002\u8fd9\u79cd\u65b9\u6cd5\u5141\u8bb8\u4f60\u63a7\u5236\u4fe1\u606f\u7684\u8f93\u51fa\u7ea7\u522b\uff0c\u5e76\u5728\u9700\u8981\u65f6\u67e5\u770b\u6216\u9690\u85cf\u8fd9\u4e9b\u4fe1\u606f\u3002\u6b64\u5916\uff0c\u65e5\u5fd7\u8bb0\u5f55\u53ef\u4ee5\u5e2e\u52a9\u8c03\u8bd5\u548c\u76d1\u63a7\u7a0b\u5e8f\u8fd0\u884c\u60c5\u51b5\uff0c\u800c\u4e0d\u5f71\u54cd\u7ec8\u7aef\u7684\u8f93\u51fa\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\u8ba9\u8fd4\u56de\u503c\u4e0d\u663e\u793a\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u51e0\u79cd\u65b9\u6cd5\uff1a\u4f7f\u7528\u5206\u53f7\u3001\u5c06\u8fd4\u56de\u503c\u8d4b\u503c\u7ed9\u4e00\u4e2a\u53d8\u91cf\u3001\u4f7f\u7528_\u5360\u4f4d\u7b26\u3001\u4f7f\u7528pa [&hellip;]","protected":false},"author":3,"featured_media":1080737,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1080731"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1080731"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1080731\/revisions"}],"predecessor-version":[{"id":1080738,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1080731\/revisions\/1080738"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1080737"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1080731"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1080731"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1080731"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}