{"id":1033573,"date":"2024-12-31T11:43:03","date_gmt":"2024-12-31T03:43:03","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1033573.html"},"modified":"2024-12-31T11:43:06","modified_gmt":"2024-12-31T03:43:06","slug":"python3%e5%a6%82%e4%bd%95%e8%ae%a9%e8%be%93%e5%85%a5%e4%b8%ba%e7%a9%ba","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1033573.html","title":{"rendered":"Python3\u5982\u4f55\u8ba9\u8f93\u5165\u4e3a\u7a7a"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2024\/12\/f0034f57-3d56-4ab1-9265-d72ebf152198.webp?x-oss-process=image\/auto-orient,1\/format,webp\" alt=\"Python3\u5982\u4f55\u8ba9\u8f93\u5165\u4e3a\u7a7a\" \/><\/p>\n<p><p> <strong>\u5728Python3\u4e2d\uff0c\u8ba9\u8f93\u5165\u4e3a\u7a7a\u7684\u65b9\u6cd5\u6709\uff1a\u4f7f\u7528\u9ed8\u8ba4\u503c\u3001\u4f7f\u7528\u6761\u4ef6\u5224\u65ad\u3001\u4f7f\u7528try-except\u5757\u3002<\/strong> \u8be6\u7ec6\u65b9\u6cd5\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<ol>\n<li><strong>\u4f7f\u7528\u9ed8\u8ba4\u503c<\/strong>\uff1a\u5728\u51fd\u6570\u53c2\u6570\u4e2d\u8bbe\u7f6e\u9ed8\u8ba4\u503c\uff0c\u5982\u679c\u7528\u6237\u672a\u63d0\u4f9b\u8f93\u5165\uff0c\u5219\u4f7f\u7528\u9ed8\u8ba4\u503c\u3002<\/li>\n<li><strong>\u4f7f\u7528\u6761\u4ef6\u5224\u65ad<\/strong>\uff1a\u68c0\u67e5\u8f93\u5165\u662f\u5426\u4e3a\u7a7a\uff0c\u5982\u679c\u4e3a\u7a7a\u5219\u6267\u884c\u76f8\u5e94\u7684\u64cd\u4f5c\u3002<\/li>\n<li><strong>\u4f7f\u7528try-except\u5757<\/strong>\uff1a\u6355\u83b7\u5f02\u5e38\u6765\u5904\u7406\u7a7a\u8f93\u5165\u7684\u60c5\u51b5\u3002<\/li>\n<\/ol>\n<p><p>\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u6bcf\u79cd\u65b9\u6cd5\u7684\u5b9e\u73b0\u65b9\u5f0f\uff0c\u5e76\u63d0\u4f9b\u5177\u4f53\u7684\u4ee3\u7801\u793a\u4f8b\u548c\u5e94\u7528\u573a\u666f\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528\u9ed8\u8ba4\u503c<\/h3>\n<\/p>\n<p><p>\u4f7f\u7528\u9ed8\u8ba4\u503c\u662f\u6700\u7b80\u5355\u7684\u65b9\u6cd5\u4e4b\u4e00\u3002\u5728\u5b9a\u4e49\u51fd\u6570\u65f6\uff0c\u53ef\u4ee5\u4e3a\u53c2\u6570\u8bbe\u7f6e\u4e00\u4e2a\u9ed8\u8ba4\u503c\u3002\u5f53\u51fd\u6570\u88ab\u8c03\u7528\u800c\u6ca1\u6709\u63d0\u4f9b\u8be5\u53c2\u6570\u65f6\uff0c\u9ed8\u8ba4\u503c\u5c06\u88ab\u4f7f\u7528\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def greet(name=&quot;&quot;):<\/p>\n<p>    if name:<\/p>\n<p>        print(f&quot;Hello, {name}!&quot;)<\/p>\n<p>    else:<\/p>\n<p>        print(&quot;Hello, World!&quot;)<\/p>\n<p>greet()  # \u8f93\u51fa: Hello, World!<\/p>\n<p>greet(&quot;Alice&quot;)  # \u8f93\u51fa: Hello, Alice!<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u9762\u7684\u4ee3\u7801\u4e2d\uff0c<code>name<\/code>\u53c2\u6570\u5177\u6709\u9ed8\u8ba4\u503c<code>&quot;&quot;<\/code>\uff08\u7a7a\u5b57\u7b26\u4e32\uff09\u3002\u5982\u679c\u8c03\u7528<code>greet<\/code>\u51fd\u6570\u65f6\u6ca1\u6709\u63d0\u4f9b<code>name<\/code>\u53c2\u6570\uff0c\u51fd\u6570\u4f1a\u4f7f\u7528\u9ed8\u8ba4\u503c\u5e76\u8f93\u51fa\u201cHello, World!\u201d\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528\u6761\u4ef6\u5224\u65ad<\/h3>\n<\/p>\n<p><p>\u5728\u5904\u7406\u7528\u6237\u8f93\u5165\u65f6\uff0c\u53ef\u4ee5\u4f7f\u7528\u6761\u4ef6\u5224\u65ad\u6765\u68c0\u67e5\u8f93\u5165\u662f\u5426\u4e3a\u7a7a\u3002\u5982\u679c\u8f93\u5165\u4e3a\u7a7a\uff0c\u5219\u6267\u884c\u7279\u5b9a\u64cd\u4f5c\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">name = input(&quot;Enter your name: &quot;).strip()<\/p>\n<p>if not name:<\/p>\n<p>    print(&quot;You did not enter a name.&quot;)<\/p>\n<p>else:<\/p>\n<p>    print(f&quot;Hello, {name}!&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u4f7f\u7528\u4e86<code>strip()<\/code>\u65b9\u6cd5\u53bb\u9664\u8f93\u5165\u4e24\u7aef\u7684\u7a7a\u767d\u5b57\u7b26\uff0c\u7136\u540e\u901a\u8fc7<code>if not name<\/code>\u6765\u5224\u65ad\u8f93\u5165\u662f\u5426\u4e3a\u7a7a\u3002\u5982\u679c\u8f93\u5165\u4e3a\u7a7a\uff0c\u7a0b\u5e8f\u5c06\u63d0\u793a\u7528\u6237\u672a\u8f93\u5165\u540d\u79f0\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u4f7f\u7528try-except\u5757<\/h3>\n<\/p>\n<p><p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u6355\u83b7\u5f02\u5e38\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u5904\u7406\u7a7a\u8f93\u5165\u7684\u60c5\u51b5\u3002\u4f8b\u5982\uff0c\u5904\u7406\u6574\u6570\u8f93\u5165\u65f6\uff0c\u53ef\u4ee5\u4f7f\u7528<code>try-except<\/code>\u5757\u6765\u6355\u83b7\u8f93\u5165\u4e3a\u7a7a\u6216\u8f93\u5165\u975e\u6574\u6570\u65f6\u7684\u5f02\u5e38\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">try:<\/p>\n<p>    age = int(input(&quot;Enter your age: &quot;).strip())<\/p>\n<p>    print(f&quot;You are {age} years old.&quot;)<\/p>\n<p>except ValueError:<\/p>\n<p>    print(&quot;Invalid input. Please enter a valid age.&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c<code>int()<\/code>\u51fd\u6570\u5c1d\u8bd5\u5c06\u7528\u6237\u8f93\u5165\u8f6c\u6362\u4e3a\u6574\u6570\u3002\u5982\u679c\u8f93\u5165\u4e3a\u7a7a\u6216\u8f93\u5165\u7684\u4e0d\u662f\u6574\u6570\uff0c\u5c06\u5f15\u53d1<code>ValueError<\/code>\u5f02\u5e38\uff0c\u5e76\u6267\u884c<code>except<\/code>\u5757\u4e2d\u7684\u4ee3\u7801\uff0c\u63d0\u793a\u7528\u6237\u8f93\u5165\u65e0\u6548\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u7ed3\u5408\u591a\u79cd\u65b9\u6cd5<\/h3>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u53ef\u80fd\u9700\u8981\u7ed3\u5408\u591a\u79cd\u65b9\u6cd5\u6765\u5904\u7406\u590d\u6742\u7684\u8f93\u5165\u573a\u666f\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u7efc\u5408\u793a\u4f8b\uff0c\u5c55\u793a\u4e86\u5982\u4f55\u5904\u7406\u591a\u4e2a\u8f93\u5165\u5b57\u6bb5\uff0c\u5e76\u4f7f\u7528\u9ed8\u8ba4\u503c\u3001\u6761\u4ef6\u5224\u65ad\u548c<code>try-except<\/code>\u5757\u6765\u786e\u4fdd\u8f93\u5165\u7684\u6709\u6548\u6027\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def get_user_info():<\/p>\n<p>    name = input(&quot;Enter your name (default: &#39;Guest&#39;): &quot;).strip() or &quot;Guest&quot;<\/p>\n<p>    try:<\/p>\n<p>        age = int(input(&quot;Enter your age: &quot;).strip())<\/p>\n<p>    except ValueError:<\/p>\n<p>        age = None<\/p>\n<p>    if age is None:<\/p>\n<p>        print(f&quot;Hello, {name}! Your age is not provided.&quot;)<\/p>\n<p>    else:<\/p>\n<p>        print(f&quot;Hello, {name}! You are {age} years old.&quot;)<\/p>\n<p>get_user_info()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c<code>name<\/code>\u5b57\u6bb5\u4f7f\u7528\u9ed8\u8ba4\u503c<code>&quot;Guest&quot;<\/code>\uff0c\u800c<code>age<\/code>\u5b57\u6bb5\u4f7f\u7528<code>try-except<\/code>\u5757\u6765\u5904\u7406\u53ef\u80fd\u7684\u5f02\u5e38\u3002\u5982\u679c\u7528\u6237\u672a\u63d0\u4f9b\u5e74\u9f84\u6216\u8f93\u5165\u65e0\u6548\uff0c\u7a0b\u5e8f\u5c06\u63d0\u793a\u5e74\u9f84\u672a\u63d0\u4f9b\u3002<\/p>\n<\/p>\n<p><h3>\u4e94\u3001\u5904\u7406\u66f4\u591a\u590d\u6742\u8f93\u5165<\/h3>\n<\/p>\n<p><p>\u5728\u4e00\u4e9b\u590d\u6742\u7684\u8f93\u5165\u573a\u666f\u4e2d\uff0c\u53ef\u80fd\u9700\u8981\u66f4\u52a0\u8be6\u7ec6\u7684\u8f93\u5165\u9a8c\u8bc1\u548c\u5904\u7406\u903b\u8f91\u3002\u4f8b\u5982\uff0c\u5904\u7406\u591a\u4e2a\u8f93\u5165\u5b57\u6bb5\u5e76\u786e\u4fdd\u6bcf\u4e2a\u5b57\u6bb5\u90fd\u7b26\u5408\u7279\u5b9a\u7684\u6761\u4ef6\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u793a\u4f8b\uff0c\u5c55\u793a\u4e86\u5982\u4f55\u5904\u7406\u591a\u4e2a\u5b57\u6bb5\u7684\u8f93\u5165\uff0c\u5e76\u8fdb\u884c\u8be6\u7ec6\u7684\u9a8c\u8bc1\u548c\u5904\u7406\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def get_user_info():<\/p>\n<p>    name = input(&quot;Enter your name (default: &#39;Guest&#39;): &quot;).strip() or &quot;Guest&quot;<\/p>\n<p>    while True:<\/p>\n<p>        age_input = input(&quot;Enter your age: &quot;).strip()<\/p>\n<p>        if not age_input:<\/p>\n<p>            print(&quot;Age cannot be empty. Please enter a valid age.&quot;)<\/p>\n<p>            continue<\/p>\n<p>        try:<\/p>\n<p>            age = int(age_input)<\/p>\n<p>            if age &lt; 0:<\/p>\n<p>                print(&quot;Age cannot be negative. Please enter a valid age.&quot;)<\/p>\n<p>                continue<\/p>\n<p>            break<\/p>\n<p>        except ValueError:<\/p>\n<p>            print(&quot;Invalid input. Please enter a valid age.&quot;)<\/p>\n<p>    em<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>l = input(&quot;Enter your email (optional): &quot;).strip()<\/p>\n<p>    if not email:<\/p>\n<p>        email = None<\/p>\n<p>    print(f&quot;Hello, {name}!&quot;)<\/p>\n<p>    print(f&quot;Age: {age}&quot;)<\/p>\n<p>    if email:<\/p>\n<p>        print(f&quot;Email: {email}&quot;)<\/p>\n<p>    else:<\/p>\n<p>        print(&quot;Email: Not provided&quot;)<\/p>\n<p>get_user_info()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c<code>age<\/code>\u5b57\u6bb5\u4f7f\u7528\u4e86\u4e00\u4e2a<code>while<\/code>\u5faa\u73af\u6765\u786e\u4fdd\u8f93\u5165\u6709\u6548\u3002\u5982\u679c\u8f93\u5165\u4e3a\u7a7a\u3001\u8d1f\u6570\u6216\u65e0\u6548\uff0c\u5c06\u63d0\u793a\u7528\u6237\u91cd\u65b0\u8f93\u5165\u3002<code>email<\/code>\u5b57\u6bb5\u662f\u53ef\u9009\u7684\uff0c\u5982\u679c\u7528\u6237\u672a\u63d0\u4f9b\uff0c\u5219\u8bbe\u7f6e\u4e3a<code>None<\/code>\u3002<\/p>\n<\/p>\n<p><h3>\u516d\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u5728Python3\u4e2d\uff0c\u5904\u7406\u7a7a\u8f93\u5165\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u5305\u62ec\u4f7f\u7528\u9ed8\u8ba4\u503c\u3001\u6761\u4ef6\u5224\u65ad\u548c<code>try-except<\/code>\u5757\u3002\u6839\u636e\u5177\u4f53\u7684\u5e94\u7528\u573a\u666f\uff0c\u53ef\u4ee5\u9009\u62e9\u9002\u5408\u7684\u65b9\u6cd5\u6765\u786e\u4fdd\u8f93\u5165\u7684\u6709\u6548\u6027\u3002\u5728\u590d\u6742\u7684\u8f93\u5165\u573a\u666f\u4e2d\uff0c\u53ef\u80fd\u9700\u8981\u7ed3\u5408\u591a\u79cd\u65b9\u6cd5\u6765\u5904\u7406\u4e0d\u540c\u7c7b\u578b\u7684\u8f93\u5165\u548c\u8fdb\u884c\u8be6\u7ec6\u7684\u9a8c\u8bc1\u3002<\/p>\n<\/p>\n<p><p>\u901a\u8fc7\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u53ef\u4ee5\u6709\u6548\u5730\u5904\u7406\u7528\u6237\u8f93\u5165\uff0c\u786e\u4fdd\u7a0b\u5e8f\u7684\u5065\u58ee\u6027\u548c\u7528\u6237\u4f53\u9a8c\u7684\u63d0\u5347\u3002\u5728\u5b9e\u9645\u5f00\u53d1\u4e2d\uff0c\u5e94\u6839\u636e\u5177\u4f53\u9700\u6c42\u9009\u62e9\u6700\u9002\u5408\u7684\u65b9\u6cd5\uff0c\u5e76\u8fdb\u884c\u5145\u5206\u7684\u6d4b\u8bd5\uff0c\u786e\u4fdd\u7a0b\u5e8f\u80fd\u591f\u6b63\u786e\u5904\u7406\u5404\u79cd\u8f93\u5165\u60c5\u51b5\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python3\u4e2d\u5224\u65ad\u7528\u6237\u8f93\u5165\u662f\u5426\u4e3a\u7a7a\uff1f<\/strong><br \/>\u5728Python3\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>input()<\/code>\u51fd\u6570\u83b7\u53d6\u7528\u6237\u8f93\u5165\uff0c\u5e76\u901a\u8fc7\u7b80\u5355\u7684\u6761\u4ef6\u5224\u65ad\u6765\u68c0\u67e5\u8f93\u5165\u662f\u5426\u4e3a\u7a7a\u3002\u5177\u4f53\u6765\u8bf4\uff0c\u53ef\u4ee5\u5c06\u7528\u6237\u8f93\u5165\u7684\u7ed3\u679c\u4e0e\u7a7a\u5b57\u7b26\u4e32\u8fdb\u884c\u6bd4\u8f83\uff0c\u4f8b\u5982\uff1a<\/p>\n<pre><code class=\"language-python\">user_input = input(&quot;\u8bf7\u8f93\u5165\u5185\u5bb9: &quot;)\nif user_input == &quot;&quot;:\n    print(&quot;\u60a8\u6ca1\u6709\u8f93\u5165\u4efb\u4f55\u5185\u5bb9\u3002&quot;)\n<\/code><\/pre>\n<p>\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u53ef\u4ee5\u8f7b\u677e\u5224\u65ad\u7528\u6237\u662f\u5426\u63d0\u4f9b\u4e86\u6709\u6548\u7684\u8f93\u5165\u3002<\/p>\n<p><strong>\u5982\u4f55\u5904\u7406Python3\u4e2d\u7a7a\u8f93\u5165\u7684\u5f02\u5e38\u60c5\u51b5\uff1f<\/strong><br \/>\u5728\u5904\u7406\u7528\u6237\u8f93\u5165\u65f6\uff0c\u7a7a\u8f93\u5165\u53ef\u80fd\u4f1a\u5bfc\u81f4\u7a0b\u5e8f\u51fa\u73b0\u610f\u60f3\u4e0d\u5230\u7684\u884c\u4e3a\u3002\u4e3a\u4e86\u589e\u5f3a\u7a0b\u5e8f\u7684\u5065\u58ee\u6027\uff0c\u53ef\u4ee5\u52a0\u5165\u5f02\u5e38\u5904\u7406\u673a\u5236\u3002\u5728\u83b7\u53d6\u8f93\u5165\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528<code>try<\/code>\u548c<code>except<\/code>\u5757\u6765\u6355\u83b7\u53ef\u80fd\u7684\u9519\u8bef\u60c5\u51b5\uff0c\u4f8b\u5982\uff1a<\/p>\n<pre><code class=\"language-python\">try:\n    user_input = input(&quot;\u8bf7\u8f93\u5165\u5185\u5bb9: &quot;)\n    if not user_input.strip():\n        raise ValueError(&quot;\u8f93\u5165\u4e0d\u80fd\u4e3a\u7a7a\u3002&quot;)\nexcept ValueError as e:\n    print(e)\n<\/code><\/pre>\n<p>\u8fd9\u6837\uff0c\u5f53\u7528\u6237\u8f93\u5165\u4e3a\u7a7a\u6216\u53ea\u5305\u542b\u7a7a\u683c\u65f6\uff0c\u7a0b\u5e8f\u80fd\u591f\u4f18\u96c5\u5730\u5904\u7406\u8fd9\u79cd\u60c5\u51b5\uff0c\u800c\u4e0d\u4f1a\u5d29\u6e83\u3002<\/p>\n<p><strong>\u5728Python3\u4e2d\u5982\u4f55\u8bbe\u7f6e\u8f93\u5165\u9ed8\u8ba4\u503c\u4ee5\u907f\u514d\u7a7a\u8f93\u5165\uff1f<\/strong><br \/>\u4e3a\u4e86\u786e\u4fdd\u7528\u6237\u4e0d\u4f1a\u63d0\u4ea4\u7a7a\u8f93\u5165\uff0c\u53ef\u4ee5\u5728<code>input()<\/code>\u51fd\u6570\u4e2d\u8bbe\u7f6e\u4e00\u4e2a\u9ed8\u8ba4\u503c\u3002\u4f8b\u5982\uff0c\u5982\u679c\u7528\u6237\u76f4\u63a5\u6309\u56de\u8f66\u952e\uff0c\u53ef\u4ee5\u4f7f\u7528\u4e00\u4e2a\u6761\u4ef6\u8bed\u53e5\u4e3a\u8f93\u5165\u63d0\u4f9b\u9ed8\u8ba4\u503c\uff1a<\/p>\n<pre><code class=\"language-python\">user_input = input(&quot;\u8bf7\u8f93\u5165\u5185\u5bb9 (\u9ed8\u8ba4\u503c\u4e3a &#39;\u9ed8\u8ba4\u8f93\u5165&#39;): &quot;) or &#39;\u9ed8\u8ba4\u8f93\u5165&#39;\nprint(f&quot;\u60a8\u8f93\u5165\u7684\u5185\u5bb9\u662f: {user_input}&quot;)\n<\/code><\/pre>\n<p>\u8fd9\u79cd\u65b9\u6cd5\u4e0d\u4ec5\u53ef\u4ee5\u907f\u514d\u7a7a\u8f93\u5165\uff0c\u8fd8\u80fd\u63d0\u4f9b\u66f4\u53cb\u597d\u7684\u7528\u6237\u4f53\u9a8c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python3\u4e2d\uff0c\u8ba9\u8f93\u5165\u4e3a\u7a7a\u7684\u65b9\u6cd5\u6709\uff1a\u4f7f\u7528\u9ed8\u8ba4\u503c\u3001\u4f7f\u7528\u6761\u4ef6\u5224\u65ad\u3001\u4f7f\u7528try-except\u5757\u3002 \u8be6\u7ec6\u65b9\u6cd5\u5982\u4e0b\uff1a [&hellip;]","protected":false},"author":3,"featured_media":1033581,"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\/1033573"}],"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=1033573"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1033573\/revisions"}],"predecessor-version":[{"id":1033584,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1033573\/revisions\/1033584"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1033581"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1033573"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1033573"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1033573"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}