{"id":1132573,"date":"2025-01-08T20:58:36","date_gmt":"2025-01-08T12:58:36","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1132573.html"},"modified":"2025-01-08T20:58:38","modified_gmt":"2025-01-08T12:58:38","slug":"python3%e5%a6%82%e4%bd%95%e5%9c%a8%e7%b1%bb%e9%87%8c%e9%9d%a2%e5%86%99%e9%97%ad%e5%8c%85","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1132573.html","title":{"rendered":"python3\u5982\u4f55\u5728\u7c7b\u91cc\u9762\u5199\u95ed\u5305"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25102103\/decf3d91-030e-46c1-a1eb-ef977562e4aa.webp\" alt=\"python3\u5982\u4f55\u5728\u7c7b\u91cc\u9762\u5199\u95ed\u5305\" \/><\/p>\n<p><p> <strong>\u5728Python3\u4e2d\uff0c\u7c7b\u91cc\u9762\u5199\u95ed\u5305\u7684\u4e3b\u8981\u6b65\u9aa4\u5305\u62ec\uff1a\u5b9a\u4e49\u4e00\u4e2a\u51fd\u6570\u4f5c\u4e3a\u95ed\u5305\u5916\u90e8\u51fd\u6570\u3001\u5728\u95ed\u5305\u5916\u90e8\u51fd\u6570\u4e2d\u5b9a\u4e49\u5e76\u8fd4\u56de\u5185\u90e8\u51fd\u6570\u3001\u5185\u90e8\u51fd\u6570\u5f15\u7528\u5916\u90e8\u51fd\u6570\u7684\u53d8\u91cf\u3002\u95ed\u5305\u53ef\u4ee5\u7528\u4e8e\u6570\u636e\u9690\u85cf\u3001\u5b9e\u73b0\u88c5\u9970\u5668\u3001\u521b\u5efa\u5de5\u5382\u51fd\u6570\u3002<\/strong><\/p>\n<\/p>\n<p><p>\u95ed\u5305\u5728\u7c7b\u4e2d\u7684\u5e94\u7528\u6709\u52a9\u4e8e\u5c01\u88c5\u6570\u636e\u548c\u884c\u4e3a\uff0c\u4f7f\u4ee3\u7801\u66f4\u52a0\u6a21\u5757\u5316\u548c\u6613\u4e8e\u7ef4\u62a4\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u89e3\u91ca\u5982\u4f55\u5728\u7c7b\u4e2d\u7f16\u5199\u548c\u4f7f\u7528\u95ed\u5305\uff0c\u5e76\u4ecb\u7ecd\u4e00\u4e9b\u5b9e\u9645\u5e94\u7528\u573a\u666f\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4ec0\u4e48\u662f\u95ed\u5305<\/h3>\n<\/p>\n<p><p>\u95ed\u5305\u662f\u6307\u5728\u4e00\u4e2a\u5916\u90e8\u51fd\u6570\u4e2d\u5b9a\u4e49\u4e86\u4e00\u4e2a\u5185\u90e8\u51fd\u6570\uff0c\u5e76\u4e14\u8fd9\u4e2a\u5185\u90e8\u51fd\u6570\u80fd\u591f\u5f15\u7528\u5916\u90e8\u51fd\u6570\u7684\u53d8\u91cf\uff0c\u5373\u4f7f\u5916\u90e8\u51fd\u6570\u5df2\u7ecf\u6267\u884c\u5b8c\u6bd5\u3002\u8fd9\u4f7f\u5f97\u5185\u90e8\u51fd\u6570\u53ef\u4ee5\u201c\u8bb0\u4f4f\u201d\u5e76\u8bbf\u95ee\u5176\u5916\u90e8\u51fd\u6570\u7684\u4f5c\u7528\u57df\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u5728\u7c7b\u4e2d\u5b9a\u4e49\u95ed\u5305\u7684\u57fa\u672c\u6b65\u9aa4<\/h3>\n<\/p>\n<ol>\n<li><strong>\u5b9a\u4e49\u5916\u90e8\u51fd\u6570<\/strong>\uff1a\u5728\u7c7b\u7684\u65b9\u6cd5\u4e2d\u5b9a\u4e49\u4e00\u4e2a\u5916\u90e8\u51fd\u6570\u3002<\/li>\n<li><strong>\u5b9a\u4e49\u5185\u90e8\u51fd\u6570<\/strong>\uff1a\u5728\u5916\u90e8\u51fd\u6570\u4e2d\u5b9a\u4e49\u4e00\u4e2a\u5185\u90e8\u51fd\u6570\u3002<\/li>\n<li><strong>\u8fd4\u56de\u5185\u90e8\u51fd\u6570<\/strong>\uff1a\u5916\u90e8\u51fd\u6570\u8fd4\u56de\u5185\u90e8\u51fd\u6570\uff0c\u4f7f\u5176\u6210\u4e3a\u95ed\u5305\u3002<\/li>\n<li><strong>\u5f15\u7528\u5916\u90e8\u51fd\u6570\u7684\u53d8\u91cf<\/strong>\uff1a\u5185\u90e8\u51fd\u6570\u53ef\u4ee5\u5f15\u7528\u5916\u90e8\u51fd\u6570\u7684\u53d8\u91cf\u3002<\/li>\n<\/ol>\n<p><h3>\u4e09\u3001\u5728\u7c7b\u4e2d\u4f7f\u7528\u95ed\u5305\u7684\u5b9e\u9645\u4f8b\u5b50<\/h3>\n<\/p>\n<p><h4>1. \u6570\u636e\u9690\u85cf<\/h4>\n<\/p>\n<p><p>\u95ed\u5305\u53ef\u4ee5\u7528\u4e8e\u5728\u7c7b\u4e2d\u9690\u85cf\u6570\u636e\uff0c\u4f7f\u5f97\u5916\u90e8\u65e0\u6cd5\u76f4\u63a5\u8bbf\u95ee\u548c\u4fee\u6539\u8fd9\u4e9b\u6570\u636e\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">class DataHider:<\/p>\n<p>    def __init__(self, initial_value):<\/p>\n<p>        self.initial_value = initial_value<\/p>\n<p>    def get_closure(self):<\/p>\n<p>        value = self.initial_value<\/p>\n<p>        def hidden_data():<\/p>\n<p>            return value<\/p>\n<p>        return hidden_data<\/p>\n<h2><strong>\u4f7f\u7528\u793a\u4f8b<\/strong><\/h2>\n<p>hider = DataHider(10)<\/p>\n<p>closure = hider.get_closure()<\/p>\n<p>print(closure())  # \u8f93\u51fa\uff1a10<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c<code>hidden_data<\/code>\u51fd\u6570\u5f15\u7528\u4e86<code>value<\/code>\u53d8\u91cf\uff0c\u5373\u4f7f<code>get_closure<\/code>\u65b9\u6cd5\u5df2\u7ecf\u6267\u884c\u5b8c\u6bd5\uff0c<code>hidden_data<\/code>\u51fd\u6570\u4ecd\u7136\u53ef\u4ee5\u8bbf\u95ee<code>value<\/code>\u3002<\/p>\n<\/p>\n<p><h4>2. \u5b9e\u73b0\u88c5\u9970\u5668<\/h4>\n<\/p>\n<p><p>\u88c5\u9970\u5668\u662f\u4e00\u79cd\u8bbe\u8ba1\u6a21\u5f0f\uff0c\u7528\u4e8e\u5728\u4e0d\u4fee\u6539\u5df2\u6709\u51fd\u6570\u4ee3\u7801\u7684\u60c5\u51b5\u4e0b\uff0c\u52a8\u6001\u5730\u4e3a\u51fd\u6570\u6dfb\u52a0\u529f\u80fd\u3002\u5728\u7c7b\u4e2d\u4f7f\u7528\u95ed\u5305\u53ef\u4ee5\u5b9e\u73b0\u88c5\u9970\u5668\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">class FunctionDecorator:<\/p>\n<p>    def __init__(self):<\/p>\n<p>        pass<\/p>\n<p>    def decorator(self, func):<\/p>\n<p>        def wrapper(*args, kwargs):<\/p>\n<p>            print(&quot;\u88c5\u9970\u5668\u4e4b\u524d\u7684\u64cd\u4f5c&quot;)<\/p>\n<p>            result = func(*args, kwargs)<\/p>\n<p>            print(&quot;\u88c5\u9970\u5668\u4e4b\u540e\u7684\u64cd\u4f5c&quot;)<\/p>\n<p>            return result<\/p>\n<p>        return wrapper<\/p>\n<h2><strong>\u4f7f\u7528\u793a\u4f8b<\/strong><\/h2>\n<p>decorator_instance = FunctionDecorator()<\/p>\n<p>@decorator_instance.decorator<\/p>\n<p>def sample_function(x):<\/p>\n<p>    return x * 2<\/p>\n<p>print(sample_function(5))  # \u8f93\u51fa\uff1a\u88c5\u9970\u5668\u4e4b\u524d\u7684\u64cd\u4f5c\u3001\u88c5\u9970\u5668\u4e4b\u540e\u7684\u64cd\u4f5c\u300110<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c<code>wrapper<\/code>\u51fd\u6570\u5c31\u662f\u4e00\u4e2a\u95ed\u5305\uff0c\u5b83\u5f15\u7528\u4e86\u5916\u90e8\u51fd\u6570<code>decorator<\/code>\u4e2d\u7684<code>func<\/code>\u53d8\u91cf\u3002<\/p>\n<\/p>\n<p><h4>3. \u521b\u5efa\u5de5\u5382\u51fd\u6570<\/h4>\n<\/p>\n<p><p>\u95ed\u5305\u8fd8\u53ef\u4ee5\u7528\u4e8e\u521b\u5efa\u5de5\u5382\u51fd\u6570\uff0c\u6839\u636e\u4e0d\u540c\u7684\u53c2\u6570\u751f\u6210\u4e0d\u540c\u7684\u51fd\u6570\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">class FunctionFactory:<\/p>\n<p>    def __init__(self):<\/p>\n<p>        pass<\/p>\n<p>    def create_multiplier(self, n):<\/p>\n<p>        def multiplier(x):<\/p>\n<p>            return x * n<\/p>\n<p>        return multiplier<\/p>\n<h2><strong>\u4f7f\u7528\u793a\u4f8b<\/strong><\/h2>\n<p>factory = FunctionFactory()<\/p>\n<p>double = factory.create_multiplier(2)<\/p>\n<p>triple = factory.create_multiplier(3)<\/p>\n<p>print(double(5))  # \u8f93\u51fa\uff1a10<\/p>\n<p>print(triple(5))  # \u8f93\u51fa\uff1a15<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c<code>multiplier<\/code>\u51fd\u6570\u5f15\u7528\u4e86\u5916\u90e8\u51fd\u6570<code>create_multiplier<\/code>\u4e2d\u7684<code>n<\/code>\u53d8\u91cf\uff0c\u4e0d\u540c\u7684<code>n<\/code>\u503c\u751f\u6210\u4e0d\u540c\u7684\u4e58\u6cd5\u5668\u51fd\u6570\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u95ed\u5305\u5728\u7c7b\u4e2d\u5e94\u7528\u7684\u4f18\u52bf<\/h3>\n<\/p>\n<ol>\n<li><strong>\u6570\u636e\u5c01\u88c5<\/strong>\uff1a\u95ed\u5305\u53ef\u4ee5\u5c06\u6570\u636e\u5c01\u88c5\u5728\u51fd\u6570\u5185\u90e8\uff0c\u4f7f\u5f97\u5916\u90e8\u65e0\u6cd5\u76f4\u63a5\u8bbf\u95ee\u548c\u4fee\u6539\u8fd9\u4e9b\u6570\u636e\uff0c\u63d0\u9ad8\u4e86\u4ee3\u7801\u7684\u5b89\u5168\u6027\u3002<\/li>\n<li><strong>\u4ee3\u7801\u91cd\u7528<\/strong>\uff1a\u95ed\u5305\u53ef\u4ee5\u7528\u4e8e\u521b\u5efa\u901a\u7528\u7684\u51fd\u6570\u6a21\u677f\uff0c\u901a\u8fc7\u4e0d\u540c\u7684\u53c2\u6570\u751f\u6210\u4e0d\u540c\u7684\u51fd\u6570\uff0c\u63d0\u9ad8\u4e86\u4ee3\u7801\u7684\u91cd\u7528\u6027\u3002<\/li>\n<li><strong>\u7b80\u5316\u4ee3\u7801<\/strong>\uff1a\u95ed\u5305\u53ef\u4ee5\u51cf\u5c11\u7c7b\u4e2d\u7684\u4ee3\u7801\u91cf\uff0c\u4f7f\u4ee3\u7801\u66f4\u52a0\u7b80\u6d01\u548c\u6613\u4e8e\u7406\u89e3\u3002<\/li>\n<\/ol>\n<p><h3>\u4e94\u3001\u95ed\u5305\u5728\u7c7b\u4e2d\u5e94\u7528\u7684\u6ce8\u610f\u4e8b\u9879<\/h3>\n<\/p>\n<ol>\n<li><strong>\u5185\u5b58\u6cc4\u6f0f<\/strong>\uff1a\u7531\u4e8e\u95ed\u5305\u5f15\u7528\u4e86\u5916\u90e8\u51fd\u6570\u7684\u53d8\u91cf\uff0c\u8fd9\u4e9b\u53d8\u91cf\u4e0d\u4f1a\u5728\u5916\u90e8\u51fd\u6570\u6267\u884c\u5b8c\u6bd5\u540e\u88ab\u7acb\u5373\u91ca\u653e\uff0c\u53ef\u80fd\u5bfc\u81f4\u5185\u5b58\u6cc4\u6f0f\u3002\u9700\u8981\u6ce8\u610f\u5408\u7406\u91ca\u653e\u8d44\u6e90\u3002<\/li>\n<li><strong>\u8c03\u8bd5\u56f0\u96be<\/strong>\uff1a\u95ed\u5305\u4f7f\u5f97\u51fd\u6570\u4e4b\u95f4\u7684\u5173\u7cfb\u66f4\u52a0\u590d\u6742\uff0c\u8c03\u8bd5\u65f6\u9700\u8981\u7279\u522b\u6ce8\u610f\u53d8\u91cf\u7684\u4f5c\u7528\u57df\u548c\u5f15\u7528\u5173\u7cfb\u3002<\/li>\n<li><strong>\u6027\u80fd\u5f71\u54cd<\/strong>\uff1a\u95ed\u5305\u53ef\u80fd\u4f1a\u5f71\u54cd\u4ee3\u7801\u7684\u6027\u80fd\uff0c\u7279\u522b\u662f\u5728\u9891\u7e41\u521b\u5efa\u548c\u9500\u6bc1\u95ed\u5305\u7684\u60c5\u51b5\u4e0b\uff0c\u9700\u8981\u6743\u8861\u95ed\u5305\u7684\u4f18\u52bf\u548c\u6027\u80fd\u5f00\u9500\u3002<\/li>\n<\/ol>\n<p><h3>\u516d\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u5728Python3\u4e2d\uff0c\u95ed\u5305\u662f\u4e00\u79cd\u5f3a\u5927\u7684\u5de5\u5177\uff0c\u53ef\u4ee5\u7528\u4e8e\u7c7b\u4e2d\u7684\u6570\u636e\u9690\u85cf\u3001\u5b9e\u73b0\u88c5\u9970\u5668\u3001\u521b\u5efa\u5de5\u5382\u51fd\u6570\u7b49\u3002\u901a\u8fc7\u5408\u7406\u4f7f\u7528\u95ed\u5305\uff0c\u53ef\u4ee5\u63d0\u9ad8\u4ee3\u7801\u7684\u5c01\u88c5\u6027\u3001\u91cd\u7528\u6027\u548c\u7b80\u6d01\u6027\u3002\u4f46\u5728\u4f7f\u7528\u95ed\u5305\u65f6\uff0c\u4e5f\u9700\u8981\u6ce8\u610f\u5185\u5b58\u7ba1\u7406\u3001\u8c03\u8bd5\u548c\u6027\u80fd\u7b49\u95ee\u9898\u3002\u5e0c\u671b\u8fd9\u7bc7\u6587\u7ae0\u80fd\u591f\u5e2e\u52a9\u4f60\u66f4\u597d\u5730\u7406\u89e3\u548c\u5e94\u7528\u95ed\u5305\u5728\u7c7b\u4e2d\u7684\u4f7f\u7528\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5728Python3\u4e2d\uff0c\u5982\u4f55\u5728\u7c7b\u4e2d\u5b9a\u4e49\u548c\u4f7f\u7528\u95ed\u5305\uff1f<\/strong><br \/>\u5728\u7c7b\u4e2d\u5b9a\u4e49\u95ed\u5305\u65f6\uff0c\u53ef\u4ee5\u5229\u7528\u5d4c\u5957\u51fd\u6570\u7684\u7279\u6027\u3002\u95ed\u5305\u662f\u4e00\u4e2a\u51fd\u6570\u5bf9\u8c61\uff0c\u5b83\u53ef\u4ee5\u6355\u6349\u5e76\u8bb0\u4f4f\u521b\u5efa\u5b83\u7684\u73af\u5883\u4e2d\u7684\u53d8\u91cf\u3002\u53ef\u4ee5\u5728\u7c7b\u7684\u65b9\u6cd5\u4e2d\u5b9a\u4e49\u4e00\u4e2a\u5d4c\u5957\u7684\u51fd\u6570\uff0c\u5229\u7528\u5916\u5c42\u51fd\u6570\u7684\u53d8\u91cf\u6765\u5b9e\u73b0\u95ed\u5305\u3002\u4f8b\u5982\uff1a<\/p>\n<pre><code class=\"language-python\">class Example:\n    def outer_function(self):\n        x = 10  # \u5916\u90e8\u53d8\u91cf\n        \n        def inner_function(y):\n            return x + y  # \u4f7f\u7528\u5916\u90e8\u53d8\u91cf\n        \n        return inner_function  # \u8fd4\u56de\u95ed\u5305\n\nclosure = Example().outer_function()\nprint(closure(5))  # \u8f93\u51fa\uff1a15\n<\/code><\/pre>\n<p><strong>\u5728\u7c7b\u4e2d\u4f7f\u7528\u95ed\u5305\u6709\u4ec0\u4e48\u5b9e\u9645\u5e94\u7528\uff1f<\/strong><br \/>\u95ed\u5305\u5e38\u7528\u4e8e\u5b9e\u73b0\u6570\u636e\u5c01\u88c5\u548c\u5de5\u5382\u51fd\u6570\u3002\u5728\u7c7b\u4e2d\u4f7f\u7528\u95ed\u5305\u65f6\uff0c\u53ef\u4ee5\u521b\u5efa\u53ef\u914d\u7f6e\u7684\u529f\u80fd\u3002\u4f8b\u5982\uff0c\u60a8\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2a\u5e26\u6709\u7279\u5b9a\u53c2\u6570\u7684\u51fd\u6570\uff0c\u8be5\u51fd\u6570\u5728\u7c7b\u7684\u4e0a\u4e0b\u6587\u4e2d\u4f7f\u7528\u3002\u8fd9\u4f7f\u5f97\u65b9\u6cd5\u80fd\u591f\u6839\u636e\u5bf9\u8c61\u7684\u72b6\u6001\u6765\u52a8\u6001\u6539\u53d8\u5176\u884c\u4e3a\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728\u7c7b\u7684\u5b9e\u4f8b\u65b9\u6cd5\u4e2d\u8bbf\u95ee\u95ed\u5305\u7684\u53d8\u91cf\uff1f<\/strong><br \/>\u5728\u7c7b\u7684\u5b9e\u4f8b\u65b9\u6cd5\u4e2d\u8bbf\u95ee\u95ed\u5305\u7684\u53d8\u91cf\u9700\u8981\u901a\u8fc7\u5916\u90e8\u51fd\u6570\u8fd4\u56de\u7684\u95ed\u5305\u6765\u5b9e\u73b0\u3002\u56e0\u4e3a\u95ed\u5305\u4f1a\u4fdd\u7559\u521b\u5efa\u65f6\u7684\u73af\u5883\uff0c\u6240\u4ee5\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528\u8fd9\u4e2a\u95ed\u5305\u4e2d\u7684\u53d8\u91cf\u3002\u4f8b\u5982\uff1a<\/p>\n<pre><code class=\"language-python\">class Counter:\n    def make_counter(self):\n        count = 0\n        \n        def increment():\n            nonlocal count  # \u58f0\u660e\u4f7f\u7528\u5916\u90e8\u53d8\u91cf\n            count += 1\n            return count\n        \n        return increment\n\ncounter = Counter().make_counter()\nprint(counter())  # \u8f93\u51fa\uff1a1\nprint(counter())  # \u8f93\u51fa\uff1a2\n<\/code><\/pre>\n<p>\u901a\u8fc7\u4ee5\u4e0a\u65b9\u5f0f\uff0c\u53ef\u4ee5\u5728\u7c7b\u4e2d\u7075\u6d3b\u5730\u4f7f\u7528\u95ed\u5305\uff0c\u589e\u5f3a\u4ee3\u7801\u7684\u53ef\u7ef4\u62a4\u6027\u548c\u53ef\u8bfb\u6027\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python3\u4e2d\uff0c\u7c7b\u91cc\u9762\u5199\u95ed\u5305\u7684\u4e3b\u8981\u6b65\u9aa4\u5305\u62ec\uff1a\u5b9a\u4e49\u4e00\u4e2a\u51fd\u6570\u4f5c\u4e3a\u95ed\u5305\u5916\u90e8\u51fd\u6570\u3001\u5728\u95ed\u5305\u5916\u90e8\u51fd\u6570\u4e2d\u5b9a\u4e49\u5e76\u8fd4\u56de\u5185\u90e8\u51fd [&hellip;]","protected":false},"author":3,"featured_media":1132582,"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\/1132573"}],"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=1132573"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1132573\/revisions"}],"predecessor-version":[{"id":1132583,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1132573\/revisions\/1132583"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1132582"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1132573"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1132573"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1132573"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}