{"id":977403,"date":"2024-12-27T06:29:17","date_gmt":"2024-12-26T22:29:17","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/977403.html"},"modified":"2024-12-27T06:29:21","modified_gmt":"2024-12-26T22:29:21","slug":"python%e5%a6%82%e4%bd%95%e5%87%8f%e5%b0%91if-else","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/977403.html","title":{"rendered":"python\u5982\u4f55\u51cf\u5c11if else"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24202707\/4a18c1a6-b66d-4a65-af22-854e7727692b.webp\" alt=\"python\u5982\u4f55\u51cf\u5c11if else\" \/><\/p>\n<p><p> <strong>\u5728Python\u4e2d\u51cf\u5c11if else\u7684\u65b9\u6cd5\u5305\u62ec\uff1a\u4f7f\u7528\u5b57\u5178\u6620\u5c04\u3001\u5229\u7528\u4e09\u5143\u8fd0\u7b97\u7b26\u3001\u4f7f\u7528\u51fd\u6570\u5f0f\u7f16\u7a0b\u3001\u8fd0\u7528\u7b56\u7565\u6a21\u5f0f\u3002<\/strong>\u901a\u8fc7\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u53ef\u4ee5\u7b80\u5316\u4ee3\u7801\u7ed3\u6784\u3001\u63d0\u9ad8\u4ee3\u7801\u7684\u53ef\u8bfb\u6027\u548c\u7ef4\u62a4\u6027\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5176\u4e2d\u7684\u4f7f\u7528\u5b57\u5178\u6620\u5c04\u7684\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><p>\u4f7f\u7528\u5b57\u5178\u6620\u5c04\u53ef\u4ee5\u66ff\u4ee3\u591a\u91cdif else\u8bed\u53e5\u3002\u5b57\u5178\u662f\u4e00\u79cd\u975e\u5e38\u9ad8\u6548\u7684\u6570\u636e\u7ed3\u6784\uff0c\u901a\u8fc7\u952e\u503c\u5bf9\u7684\u5f62\u5f0f\u53ef\u4ee5\u8f7b\u677e\u5b9e\u73b0\u6761\u4ef6\u5206\u652f\u7684\u9009\u62e9\u3002\u5c06\u9700\u8981\u5224\u65ad\u7684\u6761\u4ef6\u4f5c\u4e3a\u5b57\u5178\u7684\u952e\uff0c\u5c06\u9700\u8981\u6267\u884c\u7684\u64cd\u4f5c\u4f5c\u4e3a\u5b57\u5178\u7684\u503c\u3002\u8fd9\u6837\u4e0d\u4ec5\u53ef\u4ee5\u51cf\u5c11\u4ee3\u7801\u884c\u6570\uff0c\u8fd8\u53ef\u4ee5\u63d0\u9ad8\u4ee3\u7801\u7684\u6267\u884c\u6548\u7387\uff0c\u56e0\u4e3a\u5b57\u5178\u7684\u67e5\u627e\u64cd\u4f5c\u65f6\u95f4\u590d\u6742\u5ea6\u4e3aO(1)\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528\u5b57\u5178\u6620\u5c04<\/h3>\n<\/p>\n<p><p>\u5b57\u5178\u6620\u5c04\u662fPython\u4e2d\u4e00\u79cd\u975e\u5e38\u7075\u6d3b\u7684\u65b9\u5f0f\uff0c\u5b83\u53ef\u4ee5\u5c06\u6761\u4ef6\u5224\u65ad\u548c\u5bf9\u5e94\u7684\u5904\u7406\u903b\u8f91\u5206\u5f00\uff0c\u4f7f\u5f97\u4ee3\u7801\u66f4\u52a0\u6e05\u6670\u3002\u5b57\u5178\u7684\u952e\u53ef\u4ee5\u662f\u4efb\u4f55\u53ef\u54c8\u5e0c\u7684\u7c7b\u578b\uff0c\u901a\u5e38\u662f\u5b57\u7b26\u4e32\u6216\u6570\u5b57\uff0c\u800c\u503c\u901a\u5e38\u662f\u51fd\u6570\u6216\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><h4>1. \u793a\u4f8b\u4ee3\u7801<\/h4>\n<\/p>\n<p><p>\u5047\u8bbe\u6211\u4eec\u6709\u4e00\u6bb5\u4ee3\u7801\uff0c\u9700\u8981\u6839\u636e\u4e0d\u540c\u7684\u8f93\u5165\u6267\u884c\u4e0d\u540c\u7684\u51fd\u6570\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def handle_a():<\/p>\n<p>    print(&quot;Handling A&quot;)<\/p>\n<p>def handle_b():<\/p>\n<p>    print(&quot;Handling B&quot;)<\/p>\n<p>def handle_c():<\/p>\n<p>    print(&quot;Handling C&quot;)<\/p>\n<p>def default_handler():<\/p>\n<p>    print(&quot;Default handler&quot;)<\/p>\n<h2><strong>\u4f7f\u7528\u5b57\u5178\u6620\u5c04<\/strong><\/h2>\n<p>handlers = {<\/p>\n<p>    &#39;a&#39;: handle_a,<\/p>\n<p>    &#39;b&#39;: handle_b,<\/p>\n<p>    &#39;c&#39;: handle_c<\/p>\n<p>}<\/p>\n<p>def handle_input(input_value):<\/p>\n<p>    # \u4f7f\u7528\u5b57\u5178\u7684get\u65b9\u6cd5\uff0c\u63d0\u4f9b\u4e00\u4e2a\u9ed8\u8ba4\u5904\u7406\u51fd\u6570<\/p>\n<p>    handler = handlers.get(input_value, default_handler)<\/p>\n<p>    handler()<\/p>\n<p>handle_input(&#39;a&#39;)  # \u8f93\u51fa: Handling A<\/p>\n<p>handle_input(&#39;d&#39;)  # \u8f93\u51fa: Default handler<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u4f18\u52bf<\/h4>\n<\/p>\n<ul>\n<li><strong>\u4ee3\u7801\u7b80\u6d01<\/strong>\uff1a\u51cf\u5c11\u4e86\u591a\u4f59\u7684if else\u7ed3\u6784\uff0c\u4f7f\u4ee3\u7801\u66f4\u4e3a\u6e05\u6670\u3002<\/li>\n<li><strong>\u6613\u4e8e\u6269\u5c55<\/strong>\uff1a\u6dfb\u52a0\u65b0\u7684\u6761\u4ef6\u5904\u7406\u53ea\u9700\u5728\u5b57\u5178\u4e2d\u6dfb\u52a0\u65b0\u7684\u952e\u503c\u5bf9\u5373\u53ef\u3002<\/li>\n<li><strong>\u63d0\u9ad8\u6548\u7387<\/strong>\uff1a\u5b57\u5178\u67e5\u627e\u7684\u65f6\u95f4\u590d\u6742\u5ea6\u4e3aO(1)\uff0c\u6bd4\u9010\u4e2a\u5224\u65ad\u7684if else\u66f4\u9ad8\u6548\u3002<\/li>\n<\/ul>\n<p><h3>\u4e8c\u3001\u5229\u7528\u4e09\u5143\u8fd0\u7b97\u7b26<\/h3>\n<\/p>\n<p><p>Python\u63d0\u4f9b\u4e86\u4e00\u4e2a\u7b80\u6d01\u7684\u8bed\u6cd5\u6765\u66ff\u4ee3\u7b80\u5355\u7684if else\u8bed\u53e5\uff0c\u5373\u4e09\u5143\u8fd0\u7b97\u7b26\u3002\u5b83\u53ef\u4ee5\u5728\u4e00\u884c\u5185\u5b8c\u6210\u6761\u4ef6\u5224\u65ad\u548c\u9009\u62e9\u8d4b\u503c\u3002<\/p>\n<\/p>\n<p><h4>1. \u793a\u4f8b\u4ee3\u7801<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">x = 10<\/p>\n<p>y = 20<\/p>\n<h2><strong>\u4f7f\u7528\u4e09\u5143\u8fd0\u7b97\u7b26<\/strong><\/h2>\n<p>max_value = x if x &gt; y else y<\/p>\n<p>print(max_value)  # \u8f93\u51fa: 20<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u4f18\u52bf<\/h4>\n<\/p>\n<ul>\n<li><strong>\u7b80\u6d01\u660e\u4e86<\/strong>\uff1a\u5c06\u7b80\u5355\u7684\u6761\u4ef6\u5224\u65ad\u548c\u8d4b\u503c\u64cd\u4f5c\u5408\u5e76\u5728\u4e00\u884c\u4e2d\u3002<\/li>\n<li><strong>\u63d0\u9ad8\u53ef\u8bfb\u6027<\/strong>\uff1a\u9002\u5408\u5728\u7b80\u5355\u6761\u4ef6\u4e0b\u5feb\u901f\u8fdb\u884c\u5224\u65ad\u548c\u8d4b\u503c\u3002<\/li>\n<\/ul>\n<p><h3>\u4e09\u3001\u4f7f\u7528\u51fd\u6570\u5f0f\u7f16\u7a0b<\/h3>\n<\/p>\n<p><p>\u51fd\u6570\u5f0f\u7f16\u7a0b\u5f3a\u8c03\u4f7f\u7528\u51fd\u6570\u6765\u8fdb\u884c\u64cd\u4f5c\uff0c\u53ef\u4ee5\u51cf\u5c11\u5bf9\u6761\u4ef6\u5224\u65ad\u7684\u4f9d\u8d56\u3002Python\u652f\u6301\u9ad8\u9636\u51fd\u6570\u3001\u533f\u540d\u51fd\u6570\uff08lambda\uff09\u7b49\u7279\u6027\uff0c\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u51cf\u5c11if else\u7684\u4f7f\u7528\u3002<\/p>\n<\/p>\n<p><h4>1. \u4f7f\u7528\u9ad8\u9636\u51fd\u6570<\/h4>\n<\/p>\n<p><p>\u9ad8\u9636\u51fd\u6570\u662f\u6307\u53ef\u4ee5\u63a5\u53d7\u5176\u4ed6\u51fd\u6570\u4f5c\u4e3a\u53c2\u6570\u7684\u51fd\u6570\uff0c\u8fd9\u5728Python\u4e2d\u975e\u5e38\u5e38\u89c1\uff0c\u6bd4\u5982<code>map<\/code>\u3001<code>filter<\/code>\u3001<code>reduce<\/code>\u7b49\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def is_even(num):<\/p>\n<p>    return num % 2 == 0<\/p>\n<p>numbers = [1, 2, 3, 4, 5, 6]<\/p>\n<h2><strong>\u4f7f\u7528filter\u51fd\u6570\u4ee3\u66ffif\u5224\u65ad<\/strong><\/h2>\n<p>even_numbers = list(filter(is_even, numbers))<\/p>\n<p>print(even_numbers)  # \u8f93\u51fa: [2, 4, 6]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u4f7f\u7528lambda\u8868\u8fbe\u5f0f<\/h4>\n<\/p>\n<p><p>Lambda\u8868\u8fbe\u5f0f\u53ef\u4ee5\u521b\u5efa\u533f\u540d\u51fd\u6570\uff0c\u9002\u7528\u4e8e\u7b80\u5355\u7684\u51fd\u6570\u903b\u8f91\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">numbers = [1, 2, 3, 4, 5, 6]<\/p>\n<h2><strong>\u4f7f\u7528lambda\u8868\u8fbe\u5f0f<\/strong><\/h2>\n<p>squared_numbers = list(map(lambda x: x2, numbers))<\/p>\n<p>print(squared_numbers)  # \u8f93\u51fa: [1, 4, 9, 16, 25, 36]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u8fd0\u7528\u7b56\u7565\u6a21\u5f0f<\/h3>\n<\/p>\n<p><p>\u7b56\u7565\u6a21\u5f0f\u662f\u4e00\u79cd\u8bbe\u8ba1\u6a21\u5f0f\uff0c\u5b83\u5141\u8bb8\u5728\u8fd0\u884c\u65f6\u9009\u62e9\u7b97\u6cd5\uff0c\u901a\u8fc7\u5c01\u88c5\u7b97\u6cd5\u6765\u5b9e\u73b0\u4e0d\u540c\u7684\u884c\u4e3a\u3002\u7b56\u7565\u6a21\u5f0f\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u51cf\u5c11if else\u8bed\u53e5\uff0c\u5c24\u5176\u662f\u5728\u6d89\u53ca\u591a\u79cd\u884c\u4e3a\u9009\u62e9\u65f6\u3002<\/p>\n<\/p>\n<p><h4>1. \u793a\u4f8b\u4ee3\u7801<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">class StrategyA:<\/p>\n<p>    def execute(self):<\/p>\n<p>        print(&quot;Executing Strategy A&quot;)<\/p>\n<p>class StrategyB:<\/p>\n<p>    def execute(self):<\/p>\n<p>        print(&quot;Executing Strategy B&quot;)<\/p>\n<p>class Context:<\/p>\n<p>    def __init__(self, strategy):<\/p>\n<p>        self._strategy = strategy<\/p>\n<p>    def set_strategy(self, strategy):<\/p>\n<p>        self._strategy = strategy<\/p>\n<p>    def execute_strategy(self):<\/p>\n<p>        self._strategy.execute()<\/p>\n<h2><strong>\u4f7f\u7528\u7b56\u7565\u6a21\u5f0f<\/strong><\/h2>\n<p>context = Context(StrategyA())<\/p>\n<p>context.execute_strategy()  # \u8f93\u51fa: Executing Strategy A<\/p>\n<p>context.set_strategy(StrategyB())<\/p>\n<p>context.execute_strategy()  # \u8f93\u51fa: Executing Strategy B<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u4f18\u52bf<\/h4>\n<\/p>\n<ul>\n<li><strong>\u7075\u6d3b\u6027<\/strong>\uff1a\u53ef\u4ee5\u5728\u8fd0\u884c\u65f6\u52a8\u6001\u66f4\u6539\u7b56\u7565\uff0c\u589e\u52a0\u4e86\u4ee3\u7801\u7684\u7075\u6d3b\u6027\u3002<\/li>\n<li><strong>\u53ef\u6269\u5c55\u6027<\/strong>\uff1a\u6dfb\u52a0\u65b0\u7684\u7b56\u7565\u53ea\u9700\u5b9a\u4e49\u65b0\u7684\u7b56\u7565\u7c7b\uff0c\u65e0\u9700\u4fee\u6539\u73b0\u6709\u4ee3\u7801\u3002<\/li>\n<\/ul>\n<p><h3>\u4e94\u3001\u4f7f\u7528\u5f02\u5e38\u5904\u7406<\/h3>\n<\/p>\n<p><p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u5f02\u5e38\u5904\u7406\u53ef\u4ee5\u66ff\u4ee3if else\u7528\u4e8e\u5904\u7406\u7279\u5b9a\u7684\u9519\u8bef\u6216\u5f02\u5e38\u72b6\u6001\u3002\u5408\u7406\u4f7f\u7528\u5f02\u5e38\u5904\u7406\u53ef\u4ee5\u63d0\u9ad8\u4ee3\u7801\u7684\u5065\u58ee\u6027\u548c\u53ef\u8bfb\u6027\u3002<\/p>\n<\/p>\n<p><h4>1. \u793a\u4f8b\u4ee3\u7801<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">def divide(a, b):<\/p>\n<p>    try:<\/p>\n<p>        result = a \/ b<\/p>\n<p>    except ZeroDivisionError:<\/p>\n<p>        print(&quot;Error: Division by zero&quot;)<\/p>\n<p>        return None<\/p>\n<p>    else:<\/p>\n<p>        return result<\/p>\n<p>print(divide(10, 2))  # \u8f93\u51fa: 5.0<\/p>\n<p>print(divide(10, 0))  # \u8f93\u51fa: Error: Division by zero<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u4f18\u52bf<\/h4>\n<\/p>\n<ul>\n<li><strong>\u63d0\u9ad8\u5065\u58ee\u6027<\/strong>\uff1a\u901a\u8fc7\u5904\u7406\u5f02\u5e38\uff0c\u53ef\u4ee5\u9632\u6b62\u7a0b\u5e8f\u5d29\u6e83\uff0c\u5e76\u63d0\u4f9b\u6709\u610f\u4e49\u7684\u9519\u8bef\u4fe1\u606f\u3002<\/li>\n<li><strong>\u7b80\u5316\u903b\u8f91<\/strong>\uff1a\u51cf\u5c11\u4e86\u5bf9\u9519\u8bef\u60c5\u51b5\u7684if else\u5224\u65ad\u3002<\/li>\n<\/ul>\n<p><h3>\u516d\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u5728Python\u4e2d\uff0c\u51cf\u5c11if else\u7684\u4f7f\u7528\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u6cd5\u5b9e\u73b0\uff0c\u5305\u62ec\u4f7f\u7528\u5b57\u5178\u6620\u5c04\u3001\u4e09\u5143\u8fd0\u7b97\u7b26\u3001\u51fd\u6570\u5f0f\u7f16\u7a0b\u3001\u7b56\u7565\u6a21\u5f0f\u4ee5\u53ca\u5f02\u5e38\u5904\u7406\u7b49\u3002\u6bcf\u79cd\u65b9\u6cd5\u90fd\u6709\u5176\u9002\u7528\u7684\u573a\u666f\u548c\u4f18\u52a3\u52bf\u3002\u901a\u8fc7\u5408\u7406\u9009\u62e9\u548c\u7ec4\u5408\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u53ef\u4ee5\u4f7f\u4ee3\u7801\u66f4\u52a0\u7b80\u6d01\u3001\u6613\u8bfb\u548c\u9ad8\u6548\u3002\u638c\u63e1\u8fd9\u4e9b\u6280\u5de7\uff0c\u4e0d\u4ec5\u53ef\u4ee5\u63d0\u9ad8\u4ee3\u7801\u8d28\u91cf\uff0c\u8fd8\u80fd\u5728\u5b9e\u9645\u9879\u76ee\u4e2d\u663e\u8457\u63d0\u5347\u5f00\u53d1\u6548\u7387\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u7528\u5b57\u5178\u4ee3\u66ff\u591a\u4e2aif else\u8bed\u53e5\uff1f<\/strong><br \/>\u4f7f\u7528\u5b57\u5178\u53ef\u4ee5\u6709\u6548\u51cf\u5c11if else\u7684\u4f7f\u7528\u573a\u666f\u3002\u901a\u8fc7\u5c06\u6761\u4ef6\u4f5c\u4e3a\u5b57\u5178\u7684\u952e\uff0c\u5c06\u5bf9\u5e94\u7684\u64cd\u4f5c\u6216\u8fd4\u56de\u503c\u4f5c\u4e3a\u503c\uff0c\u53ef\u4ee5\u7b80\u5316\u4ee3\u7801\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2a\u51fd\u6570\uff0c\u63a5\u53d7\u4e00\u4e2a\u952e\u503c\uff0c\u8fd4\u56de\u5b57\u5178\u4e2d\u5bf9\u5e94\u7684\u503c\uff0c\u8fd9\u6837\u5c31\u907f\u514d\u4e86\u591a\u4e2aif else\u7684\u5224\u65ad\u3002<\/p>\n<p><strong>\u5728Python\u4e2d\u662f\u5426\u6709\u5176\u4ed6\u65b9\u5f0f\u53ef\u4ee5\u7b80\u5316\u6761\u4ef6\u5224\u65ad\uff1f<\/strong><br \/>\u9664\u4e86\u4f7f\u7528\u5b57\u5178\u5916\uff0cPython\u8fd8\u63d0\u4f9b\u4e86\u5176\u4ed6\u4e00\u4e9b\u529f\u80fd\uff0c\u6bd4\u5982\u5217\u8868\u63a8\u5bfc\u5f0f\u548c\u4e09\u5143\u8fd0\u7b97\u7b26\u3002\u5217\u8868\u63a8\u5bfc\u5f0f\u53ef\u4ee5\u5728\u4e00\u884c\u5185\u5904\u7406\u6761\u4ef6\u7b5b\u9009\uff0c\u4e09\u5143\u8fd0\u7b97\u7b26\u5219\u5141\u8bb8\u5728\u4e00\u4e2a\u8868\u8fbe\u5f0f\u4e2d\u8fdb\u884c\u7b80\u5355\u7684\u6761\u4ef6\u5224\u65ad\uff0c\u8fd9\u4e9b\u90fd\u53ef\u4ee5\u5e2e\u52a9\u51cf\u5c11\u4ee3\u7801\u7684\u590d\u6742\u6027\u3002<\/p>\n<p><strong>\u5982\u4f55\u4f7f\u7528\u7b56\u7565\u6a21\u5f0f\u6765\u4f18\u5316\u6761\u4ef6\u903b\u8f91\uff1f<\/strong><br \/>\u7b56\u7565\u6a21\u5f0f\u662f\u4e00\u79cd\u8bbe\u8ba1\u6a21\u5f0f\uff0c\u53ef\u4ee5\u5c06\u7b97\u6cd5\u7684\u9009\u62e9\u4e0e\u5176\u5177\u4f53\u5b9e\u73b0\u5206\u79bb\u3002\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u5b9a\u4e49\u591a\u4e2a\u7b56\u7565\u7c7b\u6216\u51fd\u6570\u6765\u66ff\u4ee3\u590d\u6742\u7684if else\u903b\u8f91\u3002\u6839\u636e\u9700\u8981\u9009\u62e9\u76f8\u5e94\u7684\u7b56\u7565\u6765\u6267\u884c\uff0c\u8fd9\u6837\u53ef\u4ee5\u63d0\u9ad8\u4ee3\u7801\u7684\u53ef\u7ef4\u62a4\u6027\u548c\u6269\u5c55\u6027\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\u51cf\u5c11if else\u7684\u65b9\u6cd5\u5305\u62ec\uff1a\u4f7f\u7528\u5b57\u5178\u6620\u5c04\u3001\u5229\u7528\u4e09\u5143\u8fd0\u7b97\u7b26\u3001\u4f7f\u7528\u51fd\u6570\u5f0f\u7f16\u7a0b\u3001\u8fd0\u7528\u7b56\u7565\u6a21\u5f0f\u3002\u901a\u8fc7 [&hellip;]","protected":false},"author":3,"featured_media":977418,"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\/977403"}],"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=977403"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/977403\/revisions"}],"predecessor-version":[{"id":977421,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/977403\/revisions\/977421"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/977418"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=977403"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=977403"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=977403"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}