{"id":967781,"date":"2024-12-27T05:00:29","date_gmt":"2024-12-26T21:00:29","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/967781.html"},"modified":"2024-12-27T05:00:31","modified_gmt":"2024-12-26T21:00:31","slug":"%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8python%e7%9a%84%e5%87%bd%e6%95%b0","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/967781.html","title":{"rendered":"\u5982\u4f55\u4f7f\u7528python\u7684\u51fd\u6570"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24182903\/c3b7cd81-4241-438e-b55e-ea70c0af3d86.webp\" alt=\"\u5982\u4f55\u4f7f\u7528python\u7684\u51fd\u6570\" \/><\/p>\n<p><p> <strong>\u4f7f\u7528Python\u7684\u51fd\u6570\u53ef\u4ee5\u901a\u8fc7\u5b9a\u4e49\u51fd\u6570\u3001\u8c03\u7528\u51fd\u6570\u3001\u4f7f\u7528\u53c2\u6570\u548c\u8fd4\u56de\u503c\u7b49\u65b9\u5f0f\u5b9e\u73b0\u3002\u5b9a\u4e49\u51fd\u6570\u65f6\u4f7f\u7528<code>def<\/code>\u5173\u952e\u5b57\u3001\u8c03\u7528\u51fd\u6570\u65f6\u9700\u4f20\u9012\u6b63\u786e\u7684\u53c2\u6570\u3001\u53ef\u4ee5\u901a\u8fc7<code>return<\/code>\u8bed\u53e5\u8fd4\u56de\u7ed3\u679c\u3002<\/strong>  <\/p>\n<\/p>\n<p><p>\u51fd\u6570\u662fPython\u7f16\u7a0b\u4e2d\u7684\u6838\u5fc3\u7ec4\u4ef6\uff0c\u5b83\u5141\u8bb8\u6211\u4eec\u5c06\u4ee3\u7801\u5757\u5c01\u88c5\u6210\u4e00\u4e2a\u53ef\u91cd\u7528\u7684\u5355\u5143\u3002\u5b9a\u4e49\u4e00\u4e2a\u51fd\u6570\u9700\u8981\u7528\u5230<code>def<\/code>\u5173\u952e\u5b57\uff0c\u540e\u9762\u8ddf\u4e0a\u51fd\u6570\u540d\u548c\u53c2\u6570\u5217\u8868\u3002\u8c03\u7528\u51fd\u6570\u65f6\uff0c\u53ea\u9700\u4f7f\u7528\u51fd\u6570\u540d\u5e76\u4f20\u9012\u76f8\u5e94\u7684\u53c2\u6570\u3002\u51fd\u6570\u53ef\u4ee5\u8fd4\u56de\u4e00\u4e2a\u7ed3\u679c\uff0c\u901a\u8fc7<code>return<\/code>\u8bed\u53e5\u5b9e\u73b0\uff0c\u8fd9\u4f7f\u5f97\u51fd\u6570\u53ef\u4ee5\u4f5c\u4e3a\u5176\u4ed6\u64cd\u4f5c\u7684\u4e00\u90e8\u5206\u3002\u4e0b\u9762\u6211\u4eec\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u5b9a\u4e49\u548c\u4f7f\u7528Python\u51fd\u6570\uff0c\u4ee5\u4fbf\u5728\u7f16\u5199\u4ee3\u7801\u65f6\u63d0\u9ad8\u6548\u7387\u548c\u7ec4\u7ec7\u6027\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u5b9a\u4e49\u51fd\u6570<\/p>\n<\/p>\n<p><p>\u5b9a\u4e49\u51fd\u6570\u662f\u4f7f\u7528Python\u51fd\u6570\u7684\u7b2c\u4e00\u6b65\u3002\u51fd\u6570\u5b9a\u4e49\u7684\u8bed\u6cd5\u662f\u4f7f\u7528<code>def<\/code>\u5173\u952e\u5b57\uff0c\u540e\u9762\u8ddf\u4e0a\u51fd\u6570\u540d\u548c\u53c2\u6570\u5217\u8868\u3002\u51fd\u6570\u4f53\u662f\u7f29\u8fdb\u7684\u4e00\u6bb5\u4ee3\u7801\uff0c\u5b83\u662f\u51fd\u6570\u7684\u5b9e\u9645\u6267\u884c\u90e8\u5206\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def greet(name):<\/p>\n<p>    &quot;&quot;&quot;\u8fd9\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u95ee\u5019\u51fd\u6570&quot;&quot;&quot;<\/p>\n<p>    print(f&quot;Hello, {name}!&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c<code>greet<\/code>\u662f\u51fd\u6570\u540d\uff0c<code>name<\/code>\u662f\u51fd\u6570\u7684\u53c2\u6570\u3002\u51fd\u6570\u4f53\u4f7f\u7528\u7f29\u8fdb\u8bed\u6cd5\uff0c\u662f<code>print<\/code>\u8bed\u53e5\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001\u8c03\u7528\u51fd\u6570<\/p>\n<\/p>\n<p><p>\u5b9a\u4e49\u51fd\u6570\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u5728\u7a0b\u5e8f\u7684\u5176\u4ed6\u90e8\u5206\u8c03\u7528\u5b83\u3002\u8c03\u7528\u51fd\u6570\u65f6\uff0c\u53ea\u9700\u4f7f\u7528\u51fd\u6570\u540d\u5e76\u4f20\u9012\u5fc5\u8981\u7684\u53c2\u6570\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">greet(&quot;Alice&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8c03\u7528\u51fd\u6570\u65f6\uff0c\u7a0b\u5e8f\u4f1a\u6267\u884c\u51fd\u6570\u4f53\u5185\u7684\u4ee3\u7801\uff0c\u5e76\u4f7f\u7528\u63d0\u4f9b\u7684\u53c2\u6570\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001\u51fd\u6570\u53c2\u6570<\/p>\n<\/p>\n<p><p>\u51fd\u6570\u53c2\u6570\u4f7f\u5f97\u51fd\u6570\u5177\u6709\u7075\u6d3b\u6027\u3002\u53c2\u6570\u53ef\u4ee5\u6709\u9ed8\u8ba4\u503c\uff0c\u4e5f\u53ef\u4ee5\u662f\u53ef\u9009\u7684\u3002Python\u652f\u6301\u591a\u79cd\u7c7b\u578b\u7684\u53c2\u6570\uff0c\u5305\u62ec\u4f4d\u7f6e\u53c2\u6570\u3001\u5173\u952e\u5b57\u53c2\u6570\u3001\u9ed8\u8ba4\u53c2\u6570\u548c\u53ef\u53d8\u53c2\u6570\u3002<\/p>\n<\/p>\n<ol>\n<li>\u4f4d\u7f6e\u53c2\u6570\uff1a\u6839\u636e\u53c2\u6570\u7684\u4f4d\u7f6e\u4f20\u9012\u503c\u3002<\/li>\n<li>\u5173\u952e\u5b57\u53c2\u6570\uff1a\u901a\u8fc7\u53c2\u6570\u540d\u4f20\u9012\u503c\u3002<\/li>\n<li>\u9ed8\u8ba4\u53c2\u6570\uff1a\u4e3a\u53c2\u6570\u63d0\u4f9b\u9ed8\u8ba4\u503c\u3002<\/li>\n<li>\u53ef\u53d8\u53c2\u6570\uff1a\u5141\u8bb8\u4f20\u9012\u53ef\u53d8\u6570\u91cf\u7684\u53c2\u6570\u3002<\/li>\n<\/ol>\n<p><pre><code class=\"language-python\">def introduce(name, age=30):<\/p>\n<p>    &quot;&quot;&quot;\u4ecb\u7ecd\u4e00\u4e2a\u4eba&quot;&quot;&quot;<\/p>\n<p>    print(f&quot;My name is {name} and I am {age} years old.&quot;)<\/p>\n<p>introduce(&quot;Bob&quot;, 25) # \u4f7f\u7528\u4f4d\u7f6e\u53c2\u6570<\/p>\n<p>introduce(age=40, name=&quot;Carol&quot;) # \u4f7f\u7528\u5173\u952e\u5b57\u53c2\u6570<\/p>\n<p>introduce(&quot;Dave&quot;) # \u4f7f\u7528\u9ed8\u8ba4\u53c2\u6570<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u56db\u3001\u8fd4\u56de\u503c<\/p>\n<\/p>\n<p><p>\u51fd\u6570\u53ef\u4ee5\u8fd4\u56de\u503c\uff0c\u8fd9\u4f7f\u5f97\u51fd\u6570\u80fd\u4e0e\u7a0b\u5e8f\u7684\u5176\u4ed6\u90e8\u5206\u8fdb\u884c\u6570\u636e\u4ea4\u4e92\u3002\u901a\u8fc7<code>return<\/code>\u8bed\u53e5\uff0c\u53ef\u4ee5\u5c06\u8ba1\u7b97\u7ed3\u679c\u8fd4\u56de\u7ed9\u8c03\u7528\u8005\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def add(a, b):<\/p>\n<p>    &quot;&quot;&quot;\u8fd4\u56de\u4e24\u4e2a\u6570\u7684\u548c&quot;&quot;&quot;<\/p>\n<p>    return a + b<\/p>\n<p>result = add(5, 3)<\/p>\n<p>print(result)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e94\u3001\u6587\u6863\u5b57\u7b26\u4e32<\/p>\n<\/p>\n<p><p>\u6587\u6863\u5b57\u7b26\u4e32\uff08docstring\uff09\u662f\u5bf9\u51fd\u6570\u8fdb\u884c\u6ce8\u91ca\u7684\u63a8\u8350\u65b9\u6cd5\u3002\u5b83\u4f4d\u4e8e\u51fd\u6570\u5934\u90e8\u7684\u7b2c\u4e00\u884c\uff0c\u4f7f\u7528\u4e09\u5f15\u53f7\u62ec\u8d77\u6765\u3002\u6587\u6863\u5b57\u7b26\u4e32\u53ef\u4ee5\u7528\u4e8e\u751f\u6210\u81ea\u52a8\u5316\u6587\u6863\uff0c\u5e76\u5e2e\u52a9\u5f00\u53d1\u8005\u7406\u89e3\u51fd\u6570\u7684\u7528\u9014\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def multiply(x, y):<\/p>\n<p>    &quot;&quot;&quot;\u8fd4\u56de\u4e24\u4e2a\u6570\u7684\u4e58\u79ef&quot;&quot;&quot;<\/p>\n<p>    return x * y<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u516d\u3001\u9ad8\u9636\u51fd\u6570<\/p>\n<\/p>\n<p><p>\u9ad8\u9636\u51fd\u6570\u662f\u53ef\u4ee5\u63a5\u53d7\u5176\u4ed6\u51fd\u6570\u4f5c\u4e3a\u53c2\u6570\u7684\u51fd\u6570\u3002Python\u652f\u6301\u9ad8\u9636\u51fd\u6570\uff0c\u4f7f\u5f97\u7f16\u5199\u4ee3\u7801\u66f4\u52a0\u7b80\u6d01\u548c\u7075\u6d3b\u3002\u5e38\u89c1\u7684\u9ad8\u9636\u51fd\u6570\u6709<code>map<\/code>\u3001<code>filter<\/code>\u548c<code>reduce<\/code>\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def square(n):<\/p>\n<p>    &quot;&quot;&quot;\u8fd4\u56de\u6570\u5b57\u7684\u5e73\u65b9&quot;&quot;&quot;<\/p>\n<p>    return n * n<\/p>\n<p>numbers = [1, 2, 3, 4]<\/p>\n<p>squared_numbers = map(square, numbers)<\/p>\n<p>print(list(squared_numbers))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e03\u3001\u533f\u540d\u51fd\u6570<\/p>\n<\/p>\n<p><p>\u533f\u540d\u51fd\u6570\u4e5f\u79f0\u4e3alambda\u51fd\u6570\uff0c\u5b83\u4eec\u662f\u6ca1\u6709\u540d\u5b57\u7684\u7b80\u5355\u51fd\u6570\u3002\u4f7f\u7528<code>lambda<\/code>\u5173\u952e\u5b57\u5b9a\u4e49\uff0c\u901a\u5e38\u7528\u4e8e\u9700\u8981\u7b80\u5355\u51fd\u6570\u7684\u573a\u666f\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">square = lambda x: x * x<\/p>\n<p>print(square(5))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u516b\u3001\u9012\u5f52\u51fd\u6570<\/p>\n<\/p>\n<p><p>\u9012\u5f52\u51fd\u6570\u662f\u8c03\u7528\u81ea\u8eab\u7684\u51fd\u6570\u3002\u5b83\u4eec\u7528\u4e8e\u89e3\u51b3\u53ef\u4ee5\u5206\u89e3\u4e3a\u66f4\u5c0f\u5b50\u95ee\u9898\u7684\u95ee\u9898\u3002\u9012\u5f52\u51fd\u6570\u5fc5\u987b\u6709\u7ec8\u6b62\u6761\u4ef6\uff0c\u5426\u5219\u4f1a\u5bfc\u81f4\u65e0\u9650\u9012\u5f52\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def factorial(n):<\/p>\n<p>    &quot;&quot;&quot;\u8fd4\u56den\u7684\u9636\u4e58&quot;&quot;&quot;<\/p>\n<p>    if n == 0:<\/p>\n<p>        return 1<\/p>\n<p>    else:<\/p>\n<p>        return n * factorial(n - 1)<\/p>\n<p>print(factorial(5))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e5d\u3001\u9519\u8bef\u5904\u7406<\/p>\n<\/p>\n<p><p>\u5728\u51fd\u6570\u4e2d\u8fdb\u884c\u9519\u8bef\u5904\u7406\u53ef\u4ee5\u63d0\u9ad8\u4ee3\u7801\u7684\u5065\u58ee\u6027\u3002\u4f7f\u7528<code>try<\/code>\u548c<code>except<\/code>\u5757\u53ef\u4ee5\u6355\u83b7\u5f02\u5e38\u5e76\u8fdb\u884c\u5904\u7406\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def divide(a, b):<\/p>\n<p>    &quot;&quot;&quot;\u8fd4\u56dea\u9664\u4ee5b\u7684\u7ed3\u679c&quot;&quot;&quot;<\/p>\n<p>    try:<\/p>\n<p>        return a \/ b<\/p>\n<p>    except ZeroDivisionError:<\/p>\n<p>        return &quot;\u9664\u6570\u4e0d\u80fd\u4e3a\u96f6&quot;<\/p>\n<p>print(divide(10, 2))<\/p>\n<p>print(divide(10, 0))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5341\u3001\u95ed\u5305<\/p>\n<\/p>\n<p><p>\u95ed\u5305\u662f\u51fd\u6570\u7684\u4e00\u79cd\u7279\u6b8a\u5f62\u5f0f\uff0c\u5141\u8bb8\u51fd\u6570\u6355\u83b7\u548c\u8bb0\u4f4f\u5176\u5b9a\u4e49\u73af\u5883\u4e2d\u7684\u53d8\u91cf\u3002\u95ed\u5305\u5728\u521b\u5efa\u65f6\u4f1a\u201c\u8bb0\u4f4f\u201d\u5176\u4e0a\u4e0b\u6587\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def outer_function(x):<\/p>\n<p>    &quot;&quot;&quot;\u5916\u90e8\u51fd\u6570&quot;&quot;&quot;<\/p>\n<p>    def inner_function(y):<\/p>\n<p>        &quot;&quot;&quot;\u5185\u90e8\u51fd\u6570&quot;&quot;&quot;<\/p>\n<p>        return x + y<\/p>\n<p>    return inner_function<\/p>\n<p>add_five = outer_function(5)<\/p>\n<p>print(add_five(10))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u7406\u89e3\u548c\u638c\u63e1\u8fd9\u4e9bPython\u51fd\u6570\u7684\u4f7f\u7528\u65b9\u6cd5\uff0c\u7a0b\u5e8f\u5458\u53ef\u4ee5\u7f16\u5199\u66f4\u9ad8\u6548\u3001\u53ef\u7ef4\u62a4\u6027\u5f3a\u7684\u4ee3\u7801\u3002\u51fd\u6570\u662f\u6a21\u5757\u5316\u7f16\u7a0b\u7684\u57fa\u7840\uff0c\u5408\u7406\u4f7f\u7528\u51fd\u6570\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u66f4\u597d\u5730\u7ec4\u7ec7\u4ee3\u7801\uff0c\u63d0\u5347\u4ee3\u7801\u7684\u53ef\u8bfb\u6027\u548c\u53ef\u590d\u7528\u6027\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5b9a\u4e49\u4e00\u4e2a\u7b80\u5355\u7684Python\u51fd\u6570\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u5b9a\u4e49\u51fd\u6570\u975e\u5e38\u7b80\u5355\u3002\u4f7f\u7528<code>def<\/code>\u5173\u952e\u5b57\uff0c\u540e\u8ddf\u51fd\u6570\u540d\u79f0\u548c\u62ec\u53f7\u3002\u51fd\u6570\u4f53\u4f7f\u7528\u7f29\u8fdb\u8868\u793a\u3002\u5728\u51fd\u6570\u5185\u90e8\uff0c\u53ef\u4ee5\u6dfb\u52a0\u53c2\u6570\u5e76\u8fd4\u56de\u503c\u3002\u4f8b\u5982\uff1a<\/p>\n<pre><code class=\"language-python\">def greet(name):\n    return f&quot;Hello, {name}!&quot;\n<\/code><\/pre>\n<p>\u8fd9\u4e2a\u51fd\u6570\u63a5\u53d7\u4e00\u4e2a\u53c2\u6570<code>name<\/code>\uff0c\u5e76\u8fd4\u56de\u4e00\u4e2a\u95ee\u5019\u5b57\u7b26\u4e32\u3002<\/p>\n<p><strong>Python\u51fd\u6570\u53ef\u4ee5\u63a5\u6536\u54ea\u4e9b\u7c7b\u578b\u7684\u53c2\u6570\uff1f<\/strong><br \/>Python\u51fd\u6570\u53ef\u4ee5\u63a5\u6536\u591a\u79cd\u7c7b\u578b\u7684\u53c2\u6570\uff0c\u5305\u62ec\u4f4d\u7f6e\u53c2\u6570\u3001\u5173\u952e\u5b57\u53c2\u6570\u3001\u9ed8\u8ba4\u53c2\u6570\u548c\u53ef\u53d8\u53c2\u6570\u3002\u4f4d\u7f6e\u53c2\u6570\u662f\u6700\u5e38\u89c1\u7684\uff0c\u5173\u952e\u5b57\u53c2\u6570\u5141\u8bb8\u5728\u8c03\u7528\u51fd\u6570\u65f6\u6307\u5b9a\u53c2\u6570\u540d\u79f0\u3002\u9ed8\u8ba4\u53c2\u6570\u53ef\u4ee5\u4e3a\u53c2\u6570\u63d0\u4f9b\u9ed8\u8ba4\u503c\uff0c\u800c\u53ef\u53d8\u53c2\u6570\uff08\u4f7f\u7528*args\u548c**kwargs\uff09\u53ef\u4ee5\u63a5\u6536\u4efb\u610f\u6570\u91cf\u7684\u53c2\u6570\u3002\u4f8b\u5982\uff1a<\/p>\n<pre><code class=\"language-python\">def example(a, b=2, *args, **kwargs):\n    print(a, b, args, kwargs)\n<\/code><\/pre>\n<p><strong>\u5982\u4f55\u5728Python\u4e2d\u5904\u7406\u51fd\u6570\u7684\u8fd4\u56de\u503c\uff1f<\/strong><br \/>Python\u51fd\u6570\u53ef\u4ee5\u8fd4\u56de\u591a\u4e2a\u503c\uff0c\u901a\u8fc7\u9017\u53f7\u5206\u9694\u7684\u65b9\u5f0f\u5b9e\u73b0\u3002\u8fd9\u4e9b\u503c\u4f1a\u4ee5\u5143\u7ec4\u7684\u5f62\u5f0f\u8fd4\u56de\u3002\u8c03\u7528\u8005\u53ef\u4ee5\u9009\u62e9\u63a5\u6536\u6240\u6709\u8fd4\u56de\u503c\u6216\u53ea\u63a5\u6536\u90e8\u5206\u3002\u4f8b\u5982\uff1a<\/p>\n<pre><code class=\"language-python\">def calculate(a, b):\n    return a + b, a - b\n\nsum_result, diff_result = calculate(5, 3)\n<\/code><\/pre>\n<p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c<code>calculate<\/code>\u51fd\u6570\u8fd4\u56de\u4e86\u4e24\u4e2a\u503c\uff0c\u5206\u522b\u662f\u548c\u4e0e\u5dee\u3002\u8c03\u7528\u8005\u53ef\u4ee5\u901a\u8fc7\u53d8\u91cf\u63a5\u6536\u8fd9\u4e9b\u8fd4\u56de\u503c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u4f7f\u7528Python\u7684\u51fd\u6570\u53ef\u4ee5\u901a\u8fc7\u5b9a\u4e49\u51fd\u6570\u3001\u8c03\u7528\u51fd\u6570\u3001\u4f7f\u7528\u53c2\u6570\u548c\u8fd4\u56de\u503c\u7b49\u65b9\u5f0f\u5b9e\u73b0\u3002\u5b9a\u4e49\u51fd\u6570\u65f6\u4f7f\u7528def\u5173\u952e\u5b57\u3001\u8c03\u7528 [&hellip;]","protected":false},"author":3,"featured_media":967785,"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\/967781"}],"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=967781"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/967781\/revisions"}],"predecessor-version":[{"id":967787,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/967781\/revisions\/967787"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/967785"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=967781"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=967781"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=967781"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}