{"id":984040,"date":"2024-12-27T07:24:36","date_gmt":"2024-12-26T23:24:36","guid":{"rendered":""},"modified":"2024-12-27T07:24:39","modified_gmt":"2024-12-26T23:24:39","slug":"python%e5%a6%82%e4%bd%95%e8%bf%bd%e5%8a%a0%e5%86%99%e6%96%87%e4%bb%b6","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/984040.html","title":{"rendered":"python\u5982\u4f55\u8ffd\u52a0\u5199\u6587\u4ef6"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24211833\/4c757140-b811-4e1a-9930-8041ac60323b.webp\" alt=\"python\u5982\u4f55\u8ffd\u52a0\u5199\u6587\u4ef6\" \/><\/p>\n<p><p> \u4e00\u3001\u5728Python\u4e2d\u8ffd\u52a0\u5199\u6587\u4ef6\u7684\u65b9\u6cd5<\/p>\n<\/p>\n<p><p>\u5728Python\u4e2d\uff0c\u8ffd\u52a0\u5199\u6587\u4ef6\u7684\u65b9\u6cd5\u4e3b\u8981\u6709\u4ee5\u4e0b\u51e0\u79cd\uff1a<strong>\u4f7f\u7528<code>open<\/code>\u51fd\u6570\u5e76\u6307\u5b9a\u6a21\u5f0f\u4e3a<code>&#39;a&#39;<\/code>\u3001<code>&#39;a+&#39;<\/code>\uff0c\u4f7f\u7528<code>with open<\/code>\u8bed\u53e5\u7ba1\u7406\u6587\u4ef6\u4e0a\u4e0b\u6587\uff0c\u786e\u4fdd\u6587\u4ef6\u81ea\u52a8\u5173\u95ed\uff0c\u4f7f\u7528<code>write<\/code>\u6216<code>writelines<\/code>\u65b9\u6cd5\u5199\u5165\u6570\u636e<\/strong>\u3002\u9009\u62e9\u5408\u9002\u7684\u65b9\u5f0f\u53d6\u51b3\u4e8e\u5177\u4f53\u9700\u6c42\u548c\u6587\u4ef6\u64cd\u4f5c\u7684\u590d\u6742\u6027\u3002\u4e0b\u9762\u5c06\u5bf9\u5176\u4e2d\u4e00\u79cd\u65b9\u6cd5\uff0c\u5373\u4f7f\u7528<code>open<\/code>\u51fd\u6570\u5e76\u6307\u5b9a\u6a21\u5f0f\u4e3a<code>&#39;a&#39;<\/code>\u8fdb\u884c\u8be6\u7ec6\u63cf\u8ff0\u3002<\/p>\n<\/p>\n<p><p>\u4f7f\u7528<code>open<\/code>\u51fd\u6570\u5e76\u6307\u5b9a\u6a21\u5f0f\u4e3a<code>&#39;a&#39;<\/code>\uff08\u5373append\u6a21\u5f0f\uff09\uff0c\u53ef\u4ee5\u5728\u4e0d\u8986\u76d6\u539f\u6709\u5185\u5bb9\u7684\u60c5\u51b5\u4e0b\u5411\u6587\u4ef6\u672b\u5c3e\u8ffd\u52a0\u6570\u636e\u3002\u8fd9\u79cd\u65b9\u5f0f\u975e\u5e38\u9002\u5408\u9700\u8981\u5728\u65e5\u5fd7\u6587\u4ef6\u3001\u6570\u636e\u8bb0\u5f55\u6587\u4ef6\u7b49\u573a\u666f\u4e2d\u4f7f\u7528\u3002\u5177\u4f53\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<ol>\n<li>\u4f7f\u7528<code>open<\/code>\u51fd\u6570\u6253\u5f00\u6587\u4ef6\u5e76\u6307\u5b9a\u6a21\u5f0f\u4e3a<code>&#39;a&#39;<\/code>\u3002\u4f8b\u5982\uff0c<code>file = open(&#39;example.txt&#39;, &#39;a&#39;)<\/code>\u3002<\/li>\n<li>\u4f7f\u7528<code>write<\/code>\u65b9\u6cd5\u5c06\u6570\u636e\u5199\u5165\u6587\u4ef6\u3002\u4f8b\u5982\uff0c<code>file.write(&#39;This is a new line.\\n&#39;)<\/code>\u3002<\/li>\n<li>\u5b8c\u6210\u64cd\u4f5c\u540e\uff0c\u4f7f\u7528<code>close<\/code>\u65b9\u6cd5\u5173\u95ed\u6587\u4ef6\uff0c\u4ee5\u786e\u4fdd\u6570\u636e\u6b63\u786e\u5199\u5165\u5e76\u91ca\u653e\u7cfb\u7edf\u8d44\u6e90\u3002\u4f8b\u5982\uff0c<code>file.close()<\/code>\u3002<\/li>\n<\/ol>\n<p><p>\u8fd9\u79cd\u65b9\u6cd5\u7684\u4f18\u70b9\u662f\u7b80\u5355\u6613\u7528\uff0c\u9002\u5408\u5c0f\u578b\u811a\u672c\u6216\u7b80\u5355\u6587\u4ef6\u64cd\u4f5c\u3002\u4f46\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u5728\u6587\u4ef6\u64cd\u4f5c\u8fc7\u7a0b\u4e2d\uff0c\u5f02\u5e38\u60c5\u51b5\u53ef\u80fd\u4f1a\u5bfc\u81f4\u6587\u4ef6\u65e0\u6cd5\u6b63\u5e38\u5173\u95ed\uff0c\u56e0\u6b64\u5efa\u8bae\u4f7f\u7528<code>with open<\/code>\u8bed\u53e5\u6765\u81ea\u52a8\u7ba1\u7406\u6587\u4ef6\u4e0a\u4e0b\u6587\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001\u4f7f\u7528<code>with open<\/code>\u8bed\u53e5\u7ba1\u7406\u6587\u4ef6\u4e0a\u4e0b\u6587<\/p>\n<\/p>\n<p><p>\u5728Python\u4e2d\uff0c\u4f7f\u7528<code>with open<\/code>\u8bed\u53e5\u53ef\u4ee5\u66f4\u52a0\u5b89\u5168\u548c\u7b80\u6d01\u5730\u8fdb\u884c\u6587\u4ef6\u64cd\u4f5c\u3002\u5728\u8ffd\u52a0\u5199\u6587\u4ef6\u65f6\uff0c<code>with open<\/code>\u8bed\u53e5\u80fd\u591f\u81ea\u52a8\u7ba1\u7406\u6587\u4ef6\u7684\u6253\u5f00\u548c\u5173\u95ed\uff0c\u907f\u514d\u56e0\u5f02\u5e38\u800c\u5bfc\u81f4\u7684\u8d44\u6e90\u6cc4\u9732\u3002<\/p>\n<\/p>\n<ol>\n<li>\u4f7f\u7528<code>with open<\/code>\u8bed\u53e5\u6253\u5f00\u6587\u4ef6\u5e76\u6307\u5b9a\u6a21\u5f0f\u4e3a<code>&#39;a&#39;<\/code>\u3002\u4f8b\u5982\uff0c<code>with open(&#39;example.txt&#39;, &#39;a&#39;) as file:<\/code>\u3002<\/li>\n<li>\u5728<code>with<\/code>\u8bed\u53e5\u7684\u4ee3\u7801\u5757\u4e2d\uff0c\u4f7f\u7528<code>write<\/code>\u65b9\u6cd5\u5c06\u6570\u636e\u5199\u5165\u6587\u4ef6\u3002\u4f8b\u5982\uff0c<code>file.write(&#39;This is a new line.\\n&#39;)<\/code>\u3002<\/li>\n<li>\u6587\u4ef6\u64cd\u4f5c\u5b8c\u6210\u540e\uff0c\u6587\u4ef6\u5c06\u81ea\u52a8\u5173\u95ed\uff0c\u65e0\u9700\u663e\u5f0f\u8c03\u7528<code>close<\/code>\u65b9\u6cd5\u3002<\/li>\n<\/ol>\n<p><p>\u8fd9\u79cd\u65b9\u5f0f\u7684\u4f18\u70b9\u662f\u4ee3\u7801\u7b80\u6d01\u3001\u5b89\u5168\u6027\u9ad8\uff0c\u9002\u5408\u5904\u7406\u590d\u6742\u7684\u6587\u4ef6\u64cd\u4f5c\u573a\u666f\u3002\u4f7f\u7528<code>with<\/code>\u8bed\u53e5\u53ef\u4ee5\u907f\u514d\u56e0\u9057\u6f0f\u5173\u95ed\u6587\u4ef6\u800c\u5bfc\u81f4\u7684\u6f5c\u5728\u95ee\u9898\uff0c\u662f\u6587\u4ef6\u64cd\u4f5c\u7684\u6700\u4f73\u5b9e\u8df5\u4e4b\u4e00\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001\u4f7f\u7528<code>write<\/code>\u548c<code>writelines<\/code>\u65b9\u6cd5\u5199\u5165\u6570\u636e<\/p>\n<\/p>\n<p><p>\u5728\u8fdb\u884c\u6587\u4ef6\u8ffd\u52a0\u64cd\u4f5c\u65f6\uff0c\u9664\u4e86\u4f7f\u7528<code>write<\/code>\u65b9\u6cd5\u9010\u884c\u5199\u5165\u6570\u636e\u5916\uff0c\u8fd8\u53ef\u4ee5\u4f7f\u7528<code>writelines<\/code>\u65b9\u6cd5\u4e00\u6b21\u6027\u5199\u5165\u591a\u884c\u6570\u636e\u3002\u8fd9\u79cd\u65b9\u6cd5\u5728\u9700\u8981\u5199\u5165\u591a\u884c\u6570\u636e\u65f6\u6548\u7387\u66f4\u9ad8\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p>\u4f7f\u7528<code>write<\/code>\u65b9\u6cd5\u9010\u884c\u5199\u5165\u6570\u636e\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">with open(&#39;example.txt&#39;, &#39;a&#39;) as file:<\/p>\n<p>    file.write(&#39;Line 1\\n&#39;)<\/p>\n<p>    file.write(&#39;Line 2\\n&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p>\u4f7f\u7528<code>writelines<\/code>\u65b9\u6cd5\u4e00\u6b21\u6027\u5199\u5165\u591a\u884c\u6570\u636e\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">lines = [&#39;Line 1\\n&#39;, &#39;Line 2\\n&#39;, &#39;Line 3\\n&#39;]<\/p>\n<p>with open(&#39;example.txt&#39;, &#39;a&#39;) as file:<\/p>\n<p>    file.writelines(lines)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><p><code>write<\/code>\u65b9\u6cd5\u9002\u5408\u5199\u5165\u5355\u884c\u6216\u5c11\u91cf\u6570\u636e\uff0c\u800c<code>writelines<\/code>\u65b9\u6cd5\u5219\u9002\u5408\u4e00\u6b21\u6027\u5199\u5165\u591a\u884c\u6570\u636e\uff0c\u63d0\u9ad8\u4e86\u6587\u4ef6\u5199\u5165\u7684\u6548\u7387\u3002<\/p>\n<\/p>\n<p><p>\u56db\u3001\u8ffd\u52a0\u5199\u6587\u4ef6\u7684\u5e94\u7528\u573a\u666f<\/p>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u8ffd\u52a0\u5199\u6587\u4ef6\u7684\u573a\u666f\u975e\u5e38\u5e7f\u6cdb\uff0c\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u89c1\u7684\u5e94\u7528\u573a\u666f\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u65e5\u5fd7\u8bb0\u5f55<\/strong>\uff1a\u5728\u670d\u52a1\u5668\u6216\u5e94\u7528\u7a0b\u5e8f\u4e2d\uff0c\u65e5\u5fd7\u6587\u4ef6\u901a\u5e38\u9700\u8981\u4e0d\u65ad\u8ffd\u52a0\u65b0\u7684\u65e5\u5fd7\u4fe1\u606f\uff0c\u4ee5\u4fbf\u8ddf\u8e2a\u7cfb\u7edf\u8fd0\u884c\u72b6\u6001\u548c\u9519\u8bef\u4fe1\u606f\u3002\u4f7f\u7528\u8ffd\u52a0\u5199\u6a21\u5f0f\u53ef\u4ee5\u5c06\u65b0\u65e5\u5fd7\u4fe1\u606f\u5199\u5165\u65e5\u5fd7\u6587\u4ef6\u672b\u5c3e\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u6570\u636e\u91c7\u96c6<\/strong>\uff1a\u5728\u6570\u636e\u91c7\u96c6\u548c\u5206\u6790\u8fc7\u7a0b\u4e2d\uff0c\u53ef\u80fd\u9700\u8981\u5c06\u65b0\u7684\u6570\u636e\u8ffd\u52a0\u5230\u5df2\u6709\u7684\u6587\u4ef6\u4e2d\uff0c\u4ee5\u4fbf\u540e\u7eed\u5904\u7406\u548c\u5206\u6790\u3002\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u8ffd\u52a0\u5199\u6587\u4ef6\u662f\u975e\u5e38\u5e38\u89c1\u7684\u64cd\u4f5c\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u7528\u6237\u64cd\u4f5c\u8bb0\u5f55<\/strong>\uff1a\u5728\u4e00\u4e9b\u5e94\u7528\u7a0b\u5e8f\u4e2d\uff0c\u53ef\u80fd\u9700\u8981\u8bb0\u5f55\u7528\u6237\u7684\u64cd\u4f5c\u65e5\u5fd7\uff0c\u4ee5\u4fbf\u8fdb\u884c\u5ba1\u8ba1\u548c\u5206\u6790\u3002\u901a\u8fc7\u8ffd\u52a0\u5199\u6587\u4ef6\u53ef\u4ee5\u65b9\u4fbf\u5730\u8bb0\u5f55\u7528\u6237\u7684\u6bcf\u4e00\u6b21\u64cd\u4f5c\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e94\u3001\u6ce8\u610f\u4e8b\u9879\u548c\u6700\u4f73\u5b9e\u8df5<\/p>\n<\/p>\n<p><p>\u5728\u8fdb\u884c\u6587\u4ef6\u8ffd\u52a0\u64cd\u4f5c\u65f6\uff0c\u9700\u8981\u6ce8\u610f\u4ee5\u4e0b\u51e0\u70b9\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p>\u786e\u4fdd\u6587\u4ef6\u8def\u5f84\u6b63\u786e\uff1a\u5728\u6253\u5f00\u6587\u4ef6\u4e4b\u524d\uff0c\u786e\u4fdd\u6587\u4ef6\u8def\u5f84\u6b63\u786e\uff0c\u4ee5\u907f\u514d\u6587\u4ef6\u4e0d\u5b58\u5728\u6216\u8def\u5f84\u9519\u8bef\u5bfc\u81f4\u7684\u5f02\u5e38\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p>\u4f7f\u7528\u5f02\u5e38\u5904\u7406\uff1a\u5728\u8fdb\u884c\u6587\u4ef6\u64cd\u4f5c\u65f6\uff0c\u5efa\u8bae\u4f7f\u7528\u5f02\u5e38\u5904\u7406\u673a\u5236\uff08\u5982<code>try-except<\/code>\uff09\u6765\u6355\u83b7\u53ef\u80fd\u7684\u5f02\u5e38\uff0c\u786e\u4fdd\u7a0b\u5e8f\u7684\u5065\u58ee\u6027\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p>\u4f7f\u7528<code>with open<\/code>\u8bed\u53e5\uff1a\u4f18\u5148\u4f7f\u7528<code>with open<\/code>\u8bed\u53e5\u6765\u7ba1\u7406\u6587\u4ef6\u4e0a\u4e0b\u6587\uff0c\u786e\u4fdd\u6587\u4ef6\u5728\u64cd\u4f5c\u5b8c\u6210\u540e\u81ea\u52a8\u5173\u95ed\uff0c\u907f\u514d\u8d44\u6e90\u6cc4\u9732\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p>\u6ce8\u610f\u6587\u4ef6\u7f16\u7801\uff1a\u5728\u5904\u7406\u6587\u672c\u6587\u4ef6\u65f6\uff0c\u6ce8\u610f\u6587\u4ef6\u7684\u7f16\u7801\u683c\u5f0f\u3002\u4f7f\u7528<code>open<\/code>\u51fd\u6570\u65f6\u53ef\u4ee5\u901a\u8fc7<code>encoding<\/code>\u53c2\u6570\u6307\u5b9a\u6587\u4ef6\u7f16\u7801\uff0c\u5982<code>open(&#39;example.txt&#39;, &#39;a&#39;, encoding=&#39;utf-8&#39;)<\/code>\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u901a\u8fc7\u4e86\u89e3\u4e0a\u8ff0\u8ffd\u52a0\u5199\u6587\u4ef6\u7684\u65b9\u6cd5\u548c\u5e94\u7528\u573a\u666f\uff0c\u53ef\u4ee5\u66f4\u597d\u5730\u5904\u7406Python\u4e2d\u7684\u6587\u4ef6\u64cd\u4f5c\uff0c\u63d0\u9ad8\u7a0b\u5e8f\u7684\u5065\u58ee\u6027\u548c\u53ef\u7ef4\u62a4\u6027\u3002\u65e0\u8bba\u662f\u5728\u7b80\u5355\u7684\u811a\u672c\u4e2d\uff0c\u8fd8\u662f\u5728\u590d\u6742\u7684\u5e94\u7528\u7a0b\u5e8f\u4e2d\uff0c\u638c\u63e1\u6587\u4ef6\u64cd\u4f5c\u7684\u6280\u5de7\u90fd\u662f\u975e\u5e38\u6709\u5e2e\u52a9\u7684\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u4ee5\u8ffd\u52a0\u6a21\u5f0f\u6253\u5f00\u6587\u4ef6\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u5185\u7f6e\u7684<code>open()<\/code>\u51fd\u6570\u4ee5\u8ffd\u52a0\u6a21\u5f0f\u6253\u5f00\u6587\u4ef6\u3002\u53ea\u9700\u5c06\u7b2c\u4e8c\u4e2a\u53c2\u6570\u8bbe\u7f6e\u4e3a<code>&#39;a&#39;<\/code>\uff0c\u4f8b\u5982\uff1a<code>open(&#39;file.txt&#39;, &#39;a&#39;)<\/code>\u3002\u8fd9\u79cd\u6a21\u5f0f\u4f1a\u8ba9\u4f60\u5728\u6587\u4ef6\u672b\u5c3e\u6dfb\u52a0\u5185\u5bb9\uff0c\u800c\u4e0d\u4f1a\u5220\u9664\u5df2\u6709\u7684\u5185\u5bb9\u3002<\/p>\n<p><strong>\u5728Python\u4e2d\u8ffd\u52a0\u6587\u672c\u65f6\uff0c\u5982\u4f55\u786e\u4fdd\u6362\u884c\uff1f<\/strong><br \/>\u4e3a\u4e86\u5728\u6587\u4ef6\u4e2d\u6dfb\u52a0\u65b0\u5185\u5bb9\u65f6\u4fdd\u6301\u683c\u5f0f\uff0c\u901a\u5e38\u9700\u8981\u5728\u6bcf\u6b21\u8ffd\u52a0\u6587\u672c\u524d\u52a0\u4e0a\u6362\u884c\u7b26\u3002\u53ef\u4ee5\u5728\u5199\u5165\u6587\u672c\u65f6\u4f7f\u7528<code>&#39;\\n&#39;<\/code>\uff0c\u4f8b\u5982\uff1a<code>file.write(&#39;\\n\u65b0\u5185\u5bb9&#39;)<\/code>\uff0c\u4ee5\u786e\u4fdd\u65b0\u5185\u5bb9\u4ece\u65b0\u7684\u4e00\u884c\u5f00\u59cb\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728Python\u4e2d\u4f7f\u7528\u4e0a\u4e0b\u6587\u7ba1\u7406\u5668\u8fdb\u884c\u6587\u4ef6\u8ffd\u52a0\u5199\u5165\uff1f<\/strong><br \/>\u4f7f\u7528\u4e0a\u4e0b\u6587\u7ba1\u7406\u5668\u53ef\u4ee5\u7b80\u5316\u6587\u4ef6\u64cd\u4f5c\u5e76\u786e\u4fdd\u6587\u4ef6\u5728\u64cd\u4f5c\u540e\u6b63\u786e\u5173\u95ed\u3002\u53ef\u4ee5\u4f7f\u7528<code>with<\/code>\u8bed\u53e5\u8fdb\u884c\u8ffd\u52a0\u5199\u5165\uff0c\u5982\u4e0b\u6240\u793a\uff1a  <\/p>\n<pre><code class=\"language-python\">with open(&#39;file.txt&#39;, &#39;a&#39;) as file:\n    file.write(&#39;\u8ffd\u52a0\u7684\u5185\u5bb9\\n&#39;)\n<\/code><\/pre>\n<p>\u8fd9\u79cd\u65b9\u5f0f\u4e0d\u4ec5\u7b80\u6d01\uff0c\u8fd8\u80fd\u6709\u6548\u907f\u514d\u6587\u4ef6\u672a\u5173\u95ed\u7684\u6f5c\u5728\u95ee\u9898\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u4e00\u3001\u5728Python\u4e2d\u8ffd\u52a0\u5199\u6587\u4ef6\u7684\u65b9\u6cd5 \u5728Python\u4e2d\uff0c\u8ffd\u52a0\u5199\u6587\u4ef6\u7684\u65b9\u6cd5\u4e3b\u8981\u6709\u4ee5\u4e0b\u51e0\u79cd\uff1a\u4f7f\u7528open\u51fd\u6570\u5e76\u6307\u5b9a [&hellip;]","protected":false},"author":3,"featured_media":984052,"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\/984040"}],"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=984040"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/984040\/revisions"}],"predecessor-version":[{"id":984055,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/984040\/revisions\/984055"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/984052"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=984040"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=984040"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=984040"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}