{"id":983664,"date":"2024-12-27T07:21:23","date_gmt":"2024-12-26T23:21:23","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/983664.html"},"modified":"2024-12-27T07:21:25","modified_gmt":"2024-12-26T23:21:25","slug":"python-global-%e5%a6%82%e4%bd%95%e8%b5%8b%e5%88%9d%e5%80%bc","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/983664.html","title":{"rendered":"python global \u5982\u4f55\u8d4b\u521d\u503c"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24211618\/1549ef66-72e7-4d64-8d30-6235f045ac4b.webp\" alt=\"python global \u5982\u4f55\u8d4b\u521d\u503c\" \/><\/p>\n<p><p> <strong>\u5728 Python \u4e2d\uff0cglobal \u5173\u952e\u5b57\u7528\u4e8e\u5728\u51fd\u6570\u5185\u90e8\u58f0\u660e\u4e00\u4e2a\u5168\u5c40\u53d8\u91cf\uff0c\u4f7f\u5f97\u5728\u51fd\u6570\u5185\u90e8\u80fd\u591f\u5bf9\u5176\u8fdb\u884c\u4fee\u6539\u548c\u8d4b\u503c\u3002\u8981\u4e3a\u5168\u5c40\u53d8\u91cf\u8d4b\u521d\u503c\uff0c\u53ef\u4ee5\u5728\u51fd\u6570\u5916\u90e8\u76f4\u63a5\u8fdb\u884c\u8d4b\u503c\uff0c\u7136\u540e\u5728\u51fd\u6570\u5185\u90e8\u901a\u8fc7 global \u5173\u952e\u5b57\u5f15\u7528\u8fdb\u884c\u4fee\u6539\u3002\u4e3a\u5168\u5c40\u53d8\u91cf\u8d4b\u521d\u503c\u65f6\uff0c\u786e\u4fdd\u5728\u6240\u6709\u4f7f\u7528\u8be5\u53d8\u91cf\u7684\u51fd\u6570\u4e2d\u90fd\u58f0\u660e\u5b83\u4e3a global \u53d8\u91cf\uff0c\u4ee5\u907f\u514d\u610f\u5916\u9519\u8bef\u3002<\/strong><\/p>\n<\/p>\n<p><p>\u5168\u5c40\u53d8\u91cf\u7684\u4f7f\u7528\u5728\u7a0b\u5e8f\u8bbe\u8ba1\u4e2d\u662f\u4e00\u4e2a\u5e38\u89c1\u7684\u8bdd\u9898\u3002\u5728 Python \u4e2d\uff0c\u8981\u6b63\u786e\u5730\u4e3a\u4e00\u4e2a\u5168\u5c40\u53d8\u91cf\u8d4b\u521d\u503c\u5e76\u5728\u591a\u4e2a\u51fd\u6570\u4e2d\u4f7f\u7528\u5b83\uff0c\u9700\u8981\u7406\u89e3 global \u5173\u952e\u5b57\u7684\u4f5c\u7528\u548c\u5c40\u90e8\u53d8\u91cf\u4e0e\u5168\u5c40\u53d8\u91cf\u4e4b\u95f4\u7684\u533a\u522b\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u4e3a\u5168\u5c40\u53d8\u91cf\u8d4b\u521d\u503c\uff0c\u5e76\u5728\u7a0b\u5e8f\u4e2d\u6b63\u786e\u4f7f\u7528\u3002<\/p>\n<\/p>\n<p><h2>\u4e00\u3001\u5168\u5c40\u53d8\u91cf\u7684\u5b9a\u4e49\u4e0e\u8d4b\u503c<\/h2>\n<\/p>\n<p><h3>1. \u5728\u51fd\u6570\u5916\u90e8\u5b9a\u4e49\u548c\u8d4b\u521d\u503c<\/h3>\n<\/p>\n<p><p>\u5168\u5c40\u53d8\u91cf\u901a\u5e38\u5728\u51fd\u6570\u4e4b\u5916\u5b9a\u4e49\u548c\u8d4b\u503c\u3002\u8fd9\u662f\u56e0\u4e3a\u5728 Python \u4e2d\uff0c\u53d8\u91cf\u7684\u4f5c\u7528\u57df\u53d6\u51b3\u4e8e\u5176\u5b9a\u4e49\u7684\u4f4d\u7f6e\u3002\u4e3a\u4e86\u4f7f\u53d8\u91cf\u5728\u6240\u6709\u51fd\u6570\u4e2d\u90fd\u53ef\u8bbf\u95ee\uff0c\u5fc5\u987b\u5728\u51fd\u6570\u5916\u90e8\u5b9a\u4e49\u5b83\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u5728\u51fd\u6570\u5916\u90e8\u5b9a\u4e49\u5168\u5c40\u53d8\u91cf\u5e76\u8d4b\u521d\u503c<\/p>\n<p>counter = 0<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>2. \u5728\u51fd\u6570\u5185\u90e8\u4fee\u6539\u5168\u5c40\u53d8\u91cf<\/h3>\n<\/p>\n<p><p>\u8981\u5728\u51fd\u6570\u5185\u90e8\u4fee\u6539\u4e00\u4e2a\u5168\u5c40\u53d8\u91cf\uff0c\u5fc5\u987b\u4f7f\u7528 global \u5173\u952e\u5b57\u58f0\u660e\u3002\u5426\u5219\uff0cPython \u4f1a\u5c06\u5176\u89c6\u4e3a\u5c40\u90e8\u53d8\u91cf\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def increment_counter():<\/p>\n<p>    global counter  # \u58f0\u660e\u4f7f\u7528\u5168\u5c40\u53d8\u91cf<\/p>\n<p>    counter += 1<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h2>\u4e8c\u3001global \u5173\u952e\u5b57\u7684\u4f7f\u7528<\/h2>\n<\/p>\n<p><h3>1. global \u7684\u4f5c\u7528<\/h3>\n<\/p>\n<p><p>global \u5173\u952e\u5b57\u7528\u4e8e\u5728\u51fd\u6570\u5185\u90e8\u58f0\u660e\u53d8\u91cf\u4e3a\u5168\u5c40\u53d8\u91cf\u3002\u5176\u4f5c\u7528\u662f\u544a\u8bc9 Python \u89e3\u91ca\u5668\uff0c\u8be5\u53d8\u91cf\u5728\u5168\u5c40\u4f5c\u7528\u57df\u4e2d\u5df2\u5b9a\u4e49\uff0c\u51fd\u6570\u5185\u90e8\u5bf9\u8be5\u53d8\u91cf\u7684\u4efb\u4f55\u4fee\u6539\u90fd\u662f\u5bf9\u5168\u5c40\u53d8\u91cf\u7684\u4fee\u6539\u3002<\/p>\n<\/p>\n<p><h3>2. global \u7684\u6b63\u786e\u4f7f\u7528\u573a\u666f<\/h3>\n<\/p>\n<ul>\n<li><strong>\u5f53\u9700\u8981\u5728\u591a\u4e2a\u51fd\u6570\u4e2d\u5171\u4eab\u53d8\u91cf\u65f6\u4f7f\u7528<\/strong>\uff1a\u901a\u8fc7 global \u5173\u952e\u5b57\uff0c\u53ef\u4ee5\u5728\u591a\u4e2a\u51fd\u6570\u4e2d\u5171\u4eab\u548c\u4fee\u6539\u540c\u4e00\u4e2a\u53d8\u91cf\u3002<\/li>\n<li><strong>\u907f\u514d\u4f7f\u7528\u5168\u5c40\u53d8\u91cf<\/strong>\uff1a\u867d\u7136 global \u5173\u952e\u5b57\u63d0\u4f9b\u4e86\u65b9\u4fbf\uff0c\u4f46\u8fc7\u591a\u4f9d\u8d56\u5168\u5c40\u53d8\u91cf\u53ef\u80fd\u5bfc\u81f4\u4ee3\u7801\u96be\u4ee5\u7ef4\u62a4\uff0c\u5efa\u8bae\u5c3d\u91cf\u51cf\u5c11\u4f7f\u7528\u3002<\/li>\n<\/ul>\n<p><h2>\u4e09\u3001\u5168\u5c40\u53d8\u91cf\u7684\u6700\u4f73\u5b9e\u8df5<\/h2>\n<\/p>\n<p><h3>1. \u5c3d\u91cf\u51cf\u5c11\u5168\u5c40\u53d8\u91cf\u7684\u4f7f\u7528<\/h3>\n<\/p>\n<p><p>\u5168\u5c40\u53d8\u91cf\u4f1a\u5bfc\u81f4\u4ee3\u7801\u7684\u53ef\u8bfb\u6027\u548c\u53ef\u7ef4\u62a4\u6027\u4e0b\u964d\uff0c\u56e0\u6b64\u5e94\u5c3d\u91cf\u51cf\u5c11\u4f7f\u7528\u3002\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u66ff\u4ee3\u5168\u5c40\u53d8\u91cf\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u4f7f\u7528\u7c7b\u548c\u5b9e\u4f8b\u53d8\u91cf\uff1a\u5c06\u53d8\u91cf\u5c01\u88c5\u5728\u7c7b\u4e2d\uff0c\u901a\u8fc7\u5b9e\u4f8b\u53d8\u91cf\u8fdb\u884c\u8bbf\u95ee\u548c\u4fee\u6539\u3002<\/li>\n<li>\u4f7f\u7528\u51fd\u6570\u53c2\u6570\u548c\u8fd4\u56de\u503c\uff1a\u901a\u8fc7\u51fd\u6570\u53c2\u6570\u4f20\u9012\u53d8\u91cf\uff0c\u5e76\u901a\u8fc7\u8fd4\u56de\u503c\u83b7\u53d6\u4fee\u6539\u540e\u7684\u503c\u3002<\/li>\n<\/ul>\n<p><h3>2. \u4f7f\u7528\u547d\u540d\u7ea6\u5b9a\u6765\u533a\u5206\u5168\u5c40\u53d8\u91cf<\/h3>\n<\/p>\n<p><p>\u4e3a\u4e86\u63d0\u9ad8\u4ee3\u7801\u7684\u53ef\u8bfb\u6027\uff0c\u53ef\u4ee5\u4f7f\u7528\u547d\u540d\u7ea6\u5b9a\u6765\u533a\u5206\u5168\u5c40\u53d8\u91cf\u548c\u5c40\u90e8\u53d8\u91cf\u3002\u6bd4\u5982\uff0c\u53ef\u4ee5\u4f7f\u7528\u5168\u5927\u5199\u5b57\u6bcd\u6765\u8868\u793a\u5168\u5c40\u53d8\u91cf\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u4f7f\u7528\u5927\u5199\u5b57\u6bcd\u8868\u793a\u5168\u5c40\u53d8\u91cf<\/p>\n<p>GLOBAL_COUNTER = 0<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>3. \u8b66\u60d5\u53ef\u53d8\u7c7b\u578b\u7684\u5168\u5c40\u53d8\u91cf<\/h3>\n<\/p>\n<p><p>\u5728 Python \u4e2d\uff0c\u5217\u8868\u3001\u5b57\u5178\u7b49\u53ef\u53d8\u5bf9\u8c61\u4f5c\u4e3a\u5168\u5c40\u53d8\u91cf\u65f6\uff0c\u5373\u4f7f\u4e0d\u4f7f\u7528 global \u5173\u952e\u5b57\uff0c\u51fd\u6570\u5185\u90e8\u4e5f\u53ef\u4ee5\u4fee\u6539\u5176\u5185\u5bb9\u3002\u56e0\u6b64\uff0c\u5728\u4f7f\u7528\u8fd9\u4e9b\u5bf9\u8c61\u65f6\u8981\u7279\u522b\u5c0f\u5fc3\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u53ef\u53d8\u5bf9\u8c61\u7684\u5168\u5c40\u53d8\u91cf<\/p>\n<p>global_list = []<\/p>\n<p>def add_to_list(item):<\/p>\n<p>    global_list.append(item)  # \u65e0\u9700\u4f7f\u7528 global \u5173\u952e\u5b57<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h2>\u56db\u3001\u5168\u5c40\u53d8\u91cf\u7684\u5e94\u7528\u573a\u666f<\/h2>\n<\/p>\n<p><h3>1. \u8ba1\u6570\u5668\u548c\u7d2f\u52a0\u5668<\/h3>\n<\/p>\n<p><p>\u5168\u5c40\u53d8\u91cf\u53ef\u4ee5\u7528\u4e8e\u5b9e\u73b0\u8ba1\u6570\u5668\u548c\u7d2f\u52a0\u5668\uff0c\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u4f7f\u7528\u5168\u5c40\u53d8\u91cf\u53ef\u4ee5\u907f\u514d\u5728\u51fd\u6570\u95f4\u4f20\u9012\u53c2\u6570\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">total_sum = 0<\/p>\n<p>def add_to_sum(value):<\/p>\n<p>    global total_sum<\/p>\n<p>    total_sum += value<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>2. \u914d\u7f6e\u548c\u72b6\u6001\u7ba1\u7406<\/h3>\n<\/p>\n<p><p>\u5168\u5c40\u53d8\u91cf\u53ef\u4ee5\u7528\u4e8e\u5b58\u50a8\u7a0b\u5e8f\u7684\u914d\u7f6e\u548c\u72b6\u6001\uff0c\u6bd4\u5982\u8c03\u8bd5\u6a21\u5f0f\u7684\u5f00\u5173\u3001\u6570\u636e\u5e93\u8fde\u63a5\u7b49\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">debug_mode = False<\/p>\n<p>def toggle_debug():<\/p>\n<p>    global debug_mode<\/p>\n<p>    debug_mode = not debug_mode<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>3. \u7f13\u5b58\u548c\u5171\u4eab\u6570\u636e<\/h3>\n<\/p>\n<p><p>\u5f53\u9700\u8981\u5728\u591a\u4e2a\u51fd\u6570\u4e2d\u5171\u4eab\u6570\u636e\u65f6\uff0c\u53ef\u4ee5\u4f7f\u7528\u5168\u5c40\u53d8\u91cf\u4f5c\u4e3a\u7f13\u5b58\uff0c\u4ee5\u907f\u514d\u91cd\u590d\u8ba1\u7b97\u6216\u83b7\u53d6\u6570\u636e\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">cache = {}<\/p>\n<p>def get_data(key):<\/p>\n<p>    if key in cache:<\/p>\n<p>        return cache[key]<\/p>\n<p>    # \u5426\u5219\u8ba1\u7b97\u6216\u83b7\u53d6\u6570\u636e<\/p>\n<p>    data = compute_data(key)<\/p>\n<p>    cache[key] = data<\/p>\n<p>    return data<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h2>\u4e94\u3001\u603b\u7ed3<\/h2>\n<\/p>\n<p><p>\u5168\u5c40\u53d8\u91cf\u5728\u7a0b\u5e8f\u8bbe\u8ba1\u4e2d\u63d0\u4f9b\u4e86\u65b9\u4fbf\u7684\u5171\u4eab\u6570\u636e\u673a\u5236\uff0c\u4f46\u4e5f\u5e26\u6765\u4e86\u6f5c\u5728\u7684\u98ce\u9669\u548c\u7ef4\u62a4\u96be\u5ea6\u3002\u5728 Python \u4e2d\uff0c\u4f7f\u7528 global \u5173\u952e\u5b57\u53ef\u4ee5\u5728\u51fd\u6570\u5185\u90e8\u5bf9\u5168\u5c40\u53d8\u91cf\u8fdb\u884c\u4fee\u6539\u3002\u5728\u4f7f\u7528\u5168\u5c40\u53d8\u91cf\u65f6\uff0c\u5e94\u9075\u5faa\u6700\u4f73\u5b9e\u8df5\uff0c\u5c3d\u91cf\u51cf\u5c11\u5168\u5c40\u53d8\u91cf\u7684\u4f7f\u7528\uff0c\u91c7\u7528\u5176\u4ed6\u8bbe\u8ba1\u6a21\u5f0f\u6765\u7ba1\u7406\u7a0b\u5e8f\u72b6\u6001\u548c\u6570\u636e\u3002\u901a\u8fc7\u5408\u7406\u4f7f\u7528\u5168\u5c40\u53d8\u91cf\uff0c\u53ef\u4ee5\u5728\u4fdd\u6301\u4ee3\u7801\u7b80\u6d01\u7684\u540c\u65f6\uff0c\u63d0\u9ad8\u7a0b\u5e8f\u7684\u7a33\u5b9a\u6027\u548c\u53ef\u7ef4\u62a4\u6027\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u4e3a\u5168\u5c40\u53d8\u91cf\u8d4b\u521d\u503c\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u4e3a\u5168\u5c40\u53d8\u91cf\u8d4b\u521d\u503c\u901a\u5e38\u662f\u5728\u51fd\u6570\u5916\u90e8\u8fdb\u884c\u7684\u3002\u60a8\u53ef\u4ee5\u76f4\u63a5\u5728\u51fd\u6570\u5916\u5b9a\u4e49\u53d8\u91cf\u5e76\u8d4b\u503c\u3002\u4f8b\u5982\uff1a  <\/p>\n<pre><code class=\"language-python\">global_var = 10  # \u8fd9\u662f\u4e00\u4e2a\u5168\u5c40\u53d8\u91cf\n\ndef my_function():\n    global global_var  # \u58f0\u660e\u4f7f\u7528\u5168\u5c40\u53d8\u91cf\n    global_var += 5  # \u4fee\u6539\u5168\u5c40\u53d8\u91cf\u7684\u503c\n\nmy_function()\nprint(global_var)  # \u8f93\u51fa\uff1a15\n<\/code><\/pre>\n<p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c<code>global_var<\/code>\u88ab\u8d4b\u4e88\u521d\u503c10\uff0c\u4e4b\u540e\u5728\u51fd\u6570\u4e2d\u5bf9\u5176\u8fdb\u884c\u4e86\u4fee\u6539\u3002<\/p>\n<p><strong>\u5728\u51fd\u6570\u5185\u90e8\u5982\u4f55\u4fee\u6539\u5168\u5c40\u53d8\u91cf\u7684\u503c\uff1f<\/strong><br \/>\u8981\u5728\u51fd\u6570\u5185\u90e8\u4fee\u6539\u5168\u5c40\u53d8\u91cf\uff0c\u60a8\u9700\u8981\u4f7f\u7528<code>global<\/code>\u5173\u952e\u5b57\u6765\u58f0\u660e\u8be5\u53d8\u91cf\u3002\u8fd9\u6837Python\u5c31\u77e5\u9053\u60a8\u8981\u5f15\u7528\u7684\u662f\u5168\u5c40\u4f5c\u7528\u57df\u4e2d\u7684\u53d8\u91cf\uff0c\u800c\u4e0d\u662f\u5c40\u90e8\u53d8\u91cf\u3002\u4f8b\u5982\uff1a  <\/p>\n<pre><code class=\"language-python\">x = 5  # \u5168\u5c40\u53d8\u91cf\n\ndef update_x():\n    global x  # \u4f7f\u7528\u5168\u5c40\u53d8\u91cf\n    x = 20  # \u4fee\u6539\u5168\u5c40\u53d8\u91cf\n\nupdate_x()\nprint(x)  # \u8f93\u51fa\uff1a20\n<\/code><\/pre>\n<p>\u901a\u8fc7\u5728<code>update_x<\/code>\u51fd\u6570\u4e2d\u58f0\u660e<code>x<\/code>\u4e3a\u5168\u5c40\u53d8\u91cf\uff0c\u60a8\u53ef\u4ee5\u6210\u529f\u4fee\u6539\u5176\u503c\u3002<\/p>\n<p><strong>\u5982\u4f55\u786e\u4fdd\u5168\u5c40\u53d8\u91cf\u5728\u591a\u4e2a\u51fd\u6570\u4e2d\u5171\u4eab\uff1f<\/strong><br \/>\u4e3a\u4e86\u786e\u4fdd\u5168\u5c40\u53d8\u91cf\u5728\u591a\u4e2a\u51fd\u6570\u4e2d\u53ef\u7528\uff0c\u60a8\u53ea\u9700\u5728\u51fd\u6570\u5185\u90e8\u4f7f\u7528<code>global<\/code>\u5173\u952e\u5b57\u58f0\u660e\u8be5\u53d8\u91cf\u3002\u8fd9\u6837\uff0c\u5728\u4efb\u4f55\u51fd\u6570\u4e2d\u90fd\u53ef\u4ee5\u5bf9\u5168\u5c40\u53d8\u91cf\u8fdb\u884c\u8bfb\u53d6\u548c\u4fee\u6539\u3002\u4f8b\u5982\uff1a  <\/p>\n<pre><code class=\"language-python\">counter = 0  # \u5168\u5c40\u53d8\u91cf\n\ndef increment():\n    global counter\n    counter += 1  # \u589e\u52a0\u8ba1\u6570\u5668\n\ndef reset():\n    global counter\n    counter = 0  # \u91cd\u7f6e\u8ba1\u6570\u5668\n\nincrement()\nincrement()\nprint(counter)  # \u8f93\u51fa\uff1a2\nreset()\nprint(counter)  # \u8f93\u51fa\uff1a0\n<\/code><\/pre>\n<p>\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u60a8\u53ef\u4ee5\u5728\u4e0d\u540c\u7684\u51fd\u6570\u4e2d\u5171\u4eab\u548c\u7ba1\u7406\u5168\u5c40\u53d8\u91cf\u7684\u72b6\u6001\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728 Python \u4e2d\uff0cglobal \u5173\u952e\u5b57\u7528\u4e8e\u5728\u51fd\u6570\u5185\u90e8\u58f0\u660e\u4e00\u4e2a\u5168\u5c40\u53d8\u91cf\uff0c\u4f7f\u5f97\u5728\u51fd\u6570\u5185\u90e8\u80fd\u591f\u5bf9\u5176\u8fdb\u884c\u4fee\u6539\u548c\u8d4b\u503c [&hellip;]","protected":false},"author":3,"featured_media":983676,"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\/983664"}],"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=983664"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/983664\/revisions"}],"predecessor-version":[{"id":983680,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/983664\/revisions\/983680"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/983676"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=983664"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=983664"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=983664"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}