{"id":1066254,"date":"2024-12-31T16:24:39","date_gmt":"2024-12-31T08:24:39","guid":{"rendered":""},"modified":"2024-12-31T16:24:43","modified_gmt":"2024-12-31T08:24:43","slug":"%e5%a6%82%e4%bd%95%e7%94%a8python%e5%86%99%e4%b9%98%e9%99%a4%e6%b3%95%e5%b0%8f%e7%a8%8b%e5%ba%8f","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1066254.html","title":{"rendered":"\u5982\u4f55\u7528Python\u5199\u4e58\u9664\u6cd5\u5c0f\u7a0b\u5e8f"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2024\/12\/866b9c0b-7cff-432d-b1ab-75a41c1c3228.webp?x-oss-process=image\/auto-orient,1\/format,webp\" alt=\"\u5982\u4f55\u7528Python\u5199\u4e58\u9664\u6cd5\u5c0f\u7a0b\u5e8f\" \/><\/p>\n<p><p> <strong>\u5982\u4f55\u7528Python\u5199\u4e58\u9664\u6cd5\u5c0f\u7a0b\u5e8f<\/strong><\/p>\n<\/p>\n<p><p><strong>\u7528Python\u5199\u4e58\u9664\u6cd5\u5c0f\u7a0b\u5e8f\u5f88\u7b80\u5355\uff0c\u53ea\u9700\u8981\u51e0\u4e2a\u57fa\u672c\u6b65\u9aa4\uff1a\u5bfc\u5165\u5fc5\u8981\u7684\u6a21\u5757\u3001\u5b9a\u4e49\u4e58\u6cd5\u51fd\u6570\u3001\u5b9a\u4e49\u9664\u6cd5\u51fd\u6570\u3001\u5904\u7406\u7528\u6237\u8f93\u5165\u3002<\/strong><\/p>\n<\/p>\n<p><p>\u4e00\u3001\u5bfc\u5165\u5fc5\u8981\u7684\u6a21\u5757<\/p>\n<p>Python\u4e2d\u4e0d\u9700\u8981\u989d\u5916\u7684\u6a21\u5757\u5c31\u53ef\u4ee5\u8fdb\u884c\u7b80\u5355\u7684\u4e58\u9664\u6cd5\u8fd0\u7b97\uff0c\u4f46\u4e3a\u4e86\u589e\u5f3a\u7a0b\u5e8f\u7684\u529f\u80fd\u6027\u548c\u7528\u6237\u4f53\u9a8c\uff0c\u53ef\u4ee5\u5f15\u5165\u4e00\u4e9b\u6a21\u5757\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u4f7f\u7528<code>sys<\/code>\u6a21\u5757\u6765\u5904\u7406\u547d\u4ee4\u884c\u53c2\u6570\uff0c\u6216\u4f7f\u7528<code>tkinter<\/code>\u6a21\u5757\u521b\u5efa\u56fe\u5f62\u7528\u6237\u754c\u9762\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import sys<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e8c\u3001\u5b9a\u4e49\u4e58\u6cd5\u51fd\u6570<\/p>\n<p>\u5b9a\u4e49\u4e00\u4e2a\u51fd\u6570\u7528\u4e8e\u4e58\u6cd5\u8fd0\u7b97\uff0c\u63a5\u53d7\u4e24\u4e2a\u53c2\u6570\u5e76\u8fd4\u56de\u5b83\u4eec\u7684\u79ef\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def multiply(a, b):<\/p>\n<p>    return a * b<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e09\u3001\u5b9a\u4e49\u9664\u6cd5\u51fd\u6570<\/p>\n<p>\u5b9a\u4e49\u4e00\u4e2a\u51fd\u6570\u7528\u4e8e\u9664\u6cd5\u8fd0\u7b97\uff0c\u63a5\u53d7\u4e24\u4e2a\u53c2\u6570\u5e76\u8fd4\u56de\u5b83\u4eec\u7684\u5546\uff0c\u540c\u65f6\u5904\u7406\u9664\u4ee5\u96f6\u7684\u60c5\u51b5\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def divide(a, b):<\/p>\n<p>    if b == 0:<\/p>\n<p>        return &quot;Error: Division by zero is not allowed.&quot;<\/p>\n<p>    return a \/ b<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u56db\u3001\u5904\u7406\u7528\u6237\u8f93\u5165<\/p>\n<p>\u5904\u7406\u7528\u6237\u8f93\u5165\u65f6\uff0c\u53ef\u4ee5\u4f7f\u7528\u547d\u4ee4\u884c\u53c2\u6570\u6216\u901a\u8fc7\u56fe\u5f62\u7528\u6237\u754c\u9762\u6765\u83b7\u53d6\u3002\u4ee5\u4e0b\u662f\u901a\u8fc7\u547d\u4ee4\u884c\u53c2\u6570\u83b7\u53d6\u8f93\u5165\u7684\u793a\u4f8b\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def m<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>n():<\/p>\n<p>    if len(sys.argv) != 4:<\/p>\n<p>        print(&quot;Usage: python script.py &lt;operation&gt; &lt;num1&gt; &lt;num2&gt;&quot;)<\/p>\n<p>        sys.exit(1)<\/p>\n<p>    operation = sys.argv[1]<\/p>\n<p>    num1 = float(sys.argv[2])<\/p>\n<p>    num2 = float(sys.argv[3])<\/p>\n<p>    if operation == &#39;multiply&#39;:<\/p>\n<p>        result = multiply(num1, num2)<\/p>\n<p>    elif operation == &#39;divide&#39;:<\/p>\n<p>        result = divide(num1, num2)<\/p>\n<p>    else:<\/p>\n<p>        result = &quot;Error: Unsupported operation.&quot;<\/p>\n<p>    print(f&quot;The result is: {result}&quot;)<\/p>\n<p>if __name__ == &quot;__main__&quot;:<\/p>\n<p>    main()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e94\u3001\u6269\u5c55\u529f\u80fd<\/p>\n<p>\u9664\u4e86\u57fa\u672c\u7684\u4e58\u9664\u6cd5\u8fd0\u7b97\uff0c\u8fd8\u53ef\u4ee5\u4e3a\u7a0b\u5e8f\u6dfb\u52a0\u66f4\u591a\u529f\u80fd\u3002\u4f8b\u5982\uff0c\u5904\u7406\u7528\u6237\u8f93\u5165\u9519\u8bef\u3001\u652f\u6301\u66f4\u591a\u7684\u8fd0\u7b97\u64cd\u4f5c\u3001\u63d0\u4f9b\u56fe\u5f62\u7528\u6237\u754c\u9762\u7b49\u3002<\/p>\n<\/p>\n<p><h3>\u6269\u5c55\u529f\u80fd\u4e00\uff1a\u5904\u7406\u7528\u6237\u8f93\u5165\u9519\u8bef<\/h3>\n<\/p>\n<p><p>\u5728\u5904\u7406\u7528\u6237\u8f93\u5165\u65f6\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u65e0\u6548\u7684\u8f93\u5165\u6570\u636e\u3002\u4e3a\u4e86\u63d0\u9ad8\u7a0b\u5e8f\u7684\u5065\u58ee\u6027\uff0c\u53ef\u4ee5\u6dfb\u52a0\u8f93\u5165\u9a8c\u8bc1\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def is_number(s):<\/p>\n<p>    try:<\/p>\n<p>        float(s)<\/p>\n<p>        return True<\/p>\n<p>    except ValueError:<\/p>\n<p>        return False<\/p>\n<p>def main():<\/p>\n<p>    if len(sys.argv) != 4:<\/p>\n<p>        print(&quot;Usage: python script.py &lt;operation&gt; &lt;num1&gt; &lt;num2&gt;&quot;)<\/p>\n<p>        sys.exit(1)<\/p>\n<p>    operation = sys.argv[1]<\/p>\n<p>    num1 = sys.argv[2]<\/p>\n<p>    num2 = sys.argv[3]<\/p>\n<p>    if not is_number(num1) or not is_number(num2):<\/p>\n<p>        print(&quot;Error: Both num1 and num2 should be numbers.&quot;)<\/p>\n<p>        sys.exit(1)<\/p>\n<p>    num1 = float(num1)<\/p>\n<p>    num2 = float(num2)<\/p>\n<p>    if operation == &#39;multiply&#39;:<\/p>\n<p>        result = multiply(num1, num2)<\/p>\n<p>    elif operation == &#39;divide&#39;:<\/p>\n<p>        result = divide(num1, num2)<\/p>\n<p>    else:<\/p>\n<p>        result = &quot;Error: Unsupported operation.&quot;<\/p>\n<p>    print(f&quot;The result is: {result}&quot;)<\/p>\n<p>if __name__ == &quot;__main__&quot;:<\/p>\n<p>    main()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u6269\u5c55\u529f\u80fd\u4e8c\uff1a\u652f\u6301\u66f4\u591a\u8fd0\u7b97\u64cd\u4f5c<\/h3>\n<\/p>\n<p><p>\u53ef\u4ee5\u6269\u5c55\u7a0b\u5e8f\u4ee5\u652f\u6301\u66f4\u591a\u7684\u8fd0\u7b97\u64cd\u4f5c\uff0c\u5982\u52a0\u6cd5\u548c\u51cf\u6cd5\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def add(a, b):<\/p>\n<p>    return a + b<\/p>\n<p>def subtract(a, b):<\/p>\n<p>    return a - b<\/p>\n<p>def main():<\/p>\n<p>    if len(sys.argv) != 4:<\/p>\n<p>        print(&quot;Usage: python script.py &lt;operation&gt; &lt;num1&gt; &lt;num2&gt;&quot;)<\/p>\n<p>        sys.exit(1)<\/p>\n<p>    operation = sys.argv[1]<\/p>\n<p>    num1 = sys.argv[2]<\/p>\n<p>    num2 = sys.argv[3]<\/p>\n<p>    if not is_number(num1) or not is_number(num2):<\/p>\n<p>        print(&quot;Error: Both num1 and num2 should be numbers.&quot;)<\/p>\n<p>        sys.exit(1)<\/p>\n<p>    num1 = float(num1)<\/p>\n<p>    num2 = float(num2)<\/p>\n<p>    if operation == &#39;multiply&#39;:<\/p>\n<p>        result = multiply(num1, num2)<\/p>\n<p>    elif operation == &#39;divide&#39;:<\/p>\n<p>        result = divide(num1, num2)<\/p>\n<p>    elif operation == &#39;add&#39;:<\/p>\n<p>        result = add(num1, num2)<\/p>\n<p>    elif operation == &#39;subtract&#39;:<\/p>\n<p>        result = subtract(num1, num2)<\/p>\n<p>    else:<\/p>\n<p>        result = &quot;Error: Unsupported operation.&quot;<\/p>\n<p>    print(f&quot;The result is: {result}&quot;)<\/p>\n<p>if __name__ == &quot;__main__&quot;:<\/p>\n<p>    main()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u6269\u5c55\u529f\u80fd\u4e09\uff1a\u63d0\u4f9b\u56fe\u5f62\u7528\u6237\u754c\u9762<\/h3>\n<\/p>\n<p><p>\u53ef\u4ee5\u4f7f\u7528<code>tkinter<\/code>\u6a21\u5757\u4e3a\u7a0b\u5e8f\u6dfb\u52a0\u4e00\u4e2a\u7b80\u5355\u7684\u56fe\u5f62\u7528\u6237\u754c\u9762\uff0c\u4ee5\u4fbf\u7528\u6237\u66f4\u65b9\u4fbf\u5730\u8fdb\u884c\u64cd\u4f5c\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import tkinter as tk<\/p>\n<p>def calculate():<\/p>\n<p>    num1 = float(entry_num1.get())<\/p>\n<p>    num2 = float(entry_num2.get())<\/p>\n<p>    operation = operation_var.get()<\/p>\n<p>    if operation == &#39;multiply&#39;:<\/p>\n<p>        result = multiply(num1, num2)<\/p>\n<p>    elif operation == &#39;divide&#39;:<\/p>\n<p>        result = divide(num1, num2)<\/p>\n<p>    elif operation == &#39;add&#39;:<\/p>\n<p>        result = add(num1, num2)<\/p>\n<p>    elif operation == &#39;subtract&#39;:<\/p>\n<p>        result = subtract(num1, num2)<\/p>\n<p>    else:<\/p>\n<p>        result = &quot;Error: Unsupported operation.&quot;<\/p>\n<p>    label_result.config(text=f&quot;The result is: {result}&quot;)<\/p>\n<p>root = tk.Tk()<\/p>\n<p>root.title(&quot;Simple Calculator&quot;)<\/p>\n<p>tk.Label(root, text=&quot;Number 1:&quot;).grid(row=0, column=0)<\/p>\n<p>entry_num1 = tk.Entry(root)<\/p>\n<p>entry_num1.grid(row=0, column=1)<\/p>\n<p>tk.Label(root, text=&quot;Number 2:&quot;).grid(row=1, column=0)<\/p>\n<p>entry_num2 = tk.Entry(root)<\/p>\n<p>entry_num2.grid(row=1, column=1)<\/p>\n<p>operation_var = tk.StringVar()<\/p>\n<p>operation_var.set(&quot;multiply&quot;)<\/p>\n<p>tk.OptionMenu(root, operation_var, &quot;multiply&quot;, &quot;divide&quot;, &quot;add&quot;, &quot;subtract&quot;).grid(row=2, column=1)<\/p>\n<p>tk.Button(root, text=&quot;Calculate&quot;, command=calculate).grid(row=3, column=1)<\/p>\n<p>label_result = tk.Label(root, text=&quot;The result is:&quot;)<\/p>\n<p>label_result.grid(row=4, column=1)<\/p>\n<p>root.mainloop()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u603b\u7ed3\uff1a<\/strong><\/p>\n<p><strong>\u7528Python\u5199\u4e58\u9664\u6cd5\u5c0f\u7a0b\u5e8f\u7684\u6838\u5fc3\u6b65\u9aa4\u5305\u62ec\u5bfc\u5165\u5fc5\u8981\u7684\u6a21\u5757\u3001\u5b9a\u4e49\u4e58\u6cd5\u548c\u9664\u6cd5\u51fd\u6570\u3001\u5904\u7406\u7528\u6237\u8f93\u5165\u3002\u6269\u5c55\u529f\u80fd\u53ef\u4ee5\u5305\u62ec\u5904\u7406\u7528\u6237\u8f93\u5165\u9519\u8bef\u3001\u652f\u6301\u66f4\u591a\u8fd0\u7b97\u64cd\u4f5c\u548c\u63d0\u4f9b\u56fe\u5f62\u7528\u6237\u754c\u9762\u3002<\/strong>\u8fd9\u4e9b\u529f\u80fd\u53ef\u4ee5\u589e\u5f3a\u7a0b\u5e8f\u7684\u5b9e\u7528\u6027\u548c\u7528\u6237\u4f53\u9a8c\uff0c\u4f7f\u5176\u66f4\u52a0\u5065\u58ee\u548c\u7075\u6d3b\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u7528Python\u7f16\u5199\u7b80\u5355\u7684\u8ba1\u7b97\u5668\u7a0b\u5e8f\uff1f<\/strong><br \/>\u8981\u521b\u5efa\u4e00\u4e2a\u7b80\u5355\u7684\u8ba1\u7b97\u5668\u7a0b\u5e8f\uff0c\u53ef\u4ee5\u4f7f\u7528Python\u4e2d\u7684\u8f93\u5165\u51fd\u6570\u6765\u83b7\u53d6\u7528\u6237\u8f93\u5165\uff0c\u7136\u540e\u4f7f\u7528\u57fa\u672c\u7684\u7b97\u672f\u8fd0\u7b97\u7b26\u8fdb\u884c\u8ba1\u7b97\u3002\u53ef\u4ee5\u8003\u8651\u4f7f\u7528\u4e00\u4e2a\u5faa\u73af\u6765\u5141\u8bb8\u7528\u6237\u591a\u6b21\u8fdb\u884c\u8ba1\u7b97\uff0c\u5e76\u63d0\u4f9b\u9000\u51fa\u9009\u9879\u3002\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a  <\/p>\n<pre><code class=\"language-python\">while True:\n    num1 = float(input(&quot;\u8bf7\u8f93\u5165\u7b2c\u4e00\u4e2a\u6570\u5b57: &quot;))\n    operator = input(&quot;\u8bf7\u8f93\u5165\u8fd0\u7b97\u7b26 (+, -, *, \/): &quot;)\n    num2 = float(input(&quot;\u8bf7\u8f93\u5165\u7b2c\u4e8c\u4e2a\u6570\u5b57: &quot;))\n\n    if operator == &#39;+&#39;:\n        print(f&quot;\u7ed3\u679c: {num1 + num2}&quot;)\n    elif operator == &#39;-&#39;:\n        print(f&quot;\u7ed3\u679c: {num1 - num2}&quot;)\n    elif operator == &#39;*&#39;:\n        print(f&quot;\u7ed3\u679c: {num1 * num2}&quot;)\n    elif operator == &#39;\/&#39;:\n        if num2 != 0:\n            print(f&quot;\u7ed3\u679c: {num1 \/ num2}&quot;)\n        else:\n            print(&quot;\u9519\u8bef: \u9664\u6570\u4e0d\u80fd\u4e3a\u96f6&quot;)\n    else:\n        print(&quot;\u65e0\u6548\u7684\u8fd0\u7b97\u7b26&quot;)\n\n    again = input(&quot;\u662f\u5426\u7ee7\u7eed\u8ba1\u7b97\uff1f(yes\/no): &quot;)\n    if again.lower() != &#39;yes&#39;:\n        break\n<\/code><\/pre>\n<p><strong>Python\u7a0b\u5e8f\u4e2d\u5982\u4f55\u5904\u7406\u7528\u6237\u8f93\u5165\u7684\u9519\u8bef\uff1f<\/strong><br \/>\u5904\u7406\u7528\u6237\u8f93\u5165\u65f6\uff0c\u53ef\u4ee5\u4f7f\u7528<code>try<\/code>\u548c<code>except<\/code>\u8bed\u53e5\u6765\u6355\u83b7\u53ef\u80fd\u7684\u9519\u8bef\u3002\u4f8b\u5982\uff0c\u7528\u6237\u53ef\u80fd\u4f1a\u8f93\u5165\u975e\u6570\u5b57\u5b57\u7b26\uff0c\u5bfc\u81f4\u7a0b\u5e8f\u5d29\u6e83\u3002\u53ef\u4ee5\u901a\u8fc7\u6355\u83b7\u8fd9\u4e9b\u5f02\u5e38\u6765\u63d0\u793a\u7528\u6237\u8f93\u5165\u6709\u6548\u7684\u6570\u5b57\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u9519\u8bef\u5904\u7406\u793a\u4f8b\uff1a  <\/p>\n<pre><code class=\"language-python\">try:\n    num1 = float(input(&quot;\u8bf7\u8f93\u5165\u7b2c\u4e00\u4e2a\u6570\u5b57: &quot;))\n    num2 = float(input(&quot;\u8bf7\u8f93\u5165\u7b2c\u4e8c\u4e2a\u6570\u5b57: &quot;))\nexcept ValueError:\n    print(&quot;\u65e0\u6548\u8f93\u5165\uff0c\u8bf7\u8f93\u5165\u6709\u6548\u7684\u6570\u5b57&quot;)\n<\/code><\/pre>\n<p><strong>\u5982\u4f55\u5728Python\u4e2d\u5b9e\u73b0\u4e58\u6cd5\u548c\u9664\u6cd5\u8fd0\u7b97\u7684\u529f\u80fd\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528<code>*<\/code>\u548c<code>\/<\/code>\u8fd0\u7b97\u7b26\u6765\u5b9e\u73b0\u4e58\u6cd5\u548c\u9664\u6cd5\u3002\u5bf9\u4e8e\u4e58\u6cd5\uff0c\u53ea\u9700\u5c06\u4e24\u4e2a\u6570\u5b57\u76f8\u4e58\uff0c\u800c\u5bf9\u4e8e\u9664\u6cd5\uff0c\u9700\u8981\u786e\u4fdd\u9664\u6570\u4e0d\u4e3a\u96f6\uff0c\u4ee5\u907f\u514d\u8fd0\u884c\u65f6\u9519\u8bef\u3002\u53ef\u4ee5\u901a\u8fc7\u6761\u4ef6\u8bed\u53e5\u6765\u68c0\u67e5\u8fd9\u4e00\u70b9\uff0c\u4ece\u800c\u589e\u5f3a\u7a0b\u5e8f\u7684\u9c81\u68d2\u6027\u3002\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a  <\/p>\n<pre><code class=\"language-python\">def multiply(a, b):\n    return a * b\n\ndef divide(a, b):\n    if b != 0:\n        return a \/ b\n    else:\n        return &quot;\u9519\u8bef: \u9664\u6570\u4e0d\u80fd\u4e3a\u96f6&quot;\n\nresult_multiplication = multiply(5, 3)\nresult_division = divide(5, 0)\nprint(f&quot;\u4e58\u6cd5\u7ed3\u679c: {result_multiplication}&quot;)\nprint(result_division)\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"\u5982\u4f55\u7528Python\u5199\u4e58\u9664\u6cd5\u5c0f\u7a0b\u5e8f \u7528Python\u5199\u4e58\u9664\u6cd5\u5c0f\u7a0b\u5e8f\u5f88\u7b80\u5355\uff0c\u53ea\u9700\u8981\u51e0\u4e2a\u57fa\u672c\u6b65\u9aa4\uff1a\u5bfc\u5165\u5fc5\u8981\u7684\u6a21\u5757\u3001\u5b9a\u4e49 [&hellip;]","protected":false},"author":3,"featured_media":1066264,"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\/1066254"}],"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=1066254"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1066254\/revisions"}],"predecessor-version":[{"id":1066268,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1066254\/revisions\/1066268"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1066264"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1066254"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1066254"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1066254"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}