{"id":1123537,"date":"2025-01-08T19:33:14","date_gmt":"2025-01-08T11:33:14","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1123537.html"},"modified":"2025-01-08T19:33:17","modified_gmt":"2025-01-08T11:33:17","slug":"python%e4%b8%ad%e5%a6%82%e4%bd%95%e5%b0%86%e5%87%bd%e6%95%b0%e5%bd%93%e4%bd%9c%e5%8f%82%e6%95%b0%e4%bc%a0%e9%80%92","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1123537.html","title":{"rendered":"python\u4e2d\u5982\u4f55\u5c06\u51fd\u6570\u5f53\u4f5c\u53c2\u6570\u4f20\u9012"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25084952\/11b724af-6a29-4372-a12e-d3e86e6f2b49.webp\" alt=\"python\u4e2d\u5982\u4f55\u5c06\u51fd\u6570\u5f53\u4f5c\u53c2\u6570\u4f20\u9012\" \/><\/p>\n<p><p> <strong>\u5728Python\u4e2d\uff0c\u5c06\u51fd\u6570\u4f5c\u4e3a\u53c2\u6570\u4f20\u9012\u7684\u65b9\u6cd5\u5305\u62ec\uff1a\u4f7f\u7528\u51fd\u6570\u540d\u3001lambda\u8868\u8fbe\u5f0f\u3001\u88c5\u9970\u5668\u7b49\u3002<\/strong> \u5176\u4e2d\uff0c\u6700\u5e38\u7528\u7684\u65b9\u6cd5\u662f\u76f4\u63a5\u4f7f\u7528\u51fd\u6570\u540d\u5c06\u51fd\u6570\u4f20\u9012\u7ed9\u5176\u4ed6\u51fd\u6570\u3002\u8fd9\u79cd\u65b9\u6cd5\u4e0d\u4ec5\u7b80\u6d01\u660e\u4e86\uff0c\u800c\u4e14\u975e\u5e38\u7075\u6d3b\uff0c\u53ef\u4ee5\u6ee1\u8db3\u5927\u591a\u6570\u7f16\u7a0b\u9700\u6c42\u3002<\/p>\n<\/p>\n<p><p>\u5177\u4f53\u6765\u8bf4\uff0c\u5047\u8bbe\u6211\u4eec\u6709\u4e00\u4e2a\u51fd\u6570 <code>apply_function<\/code>\uff0c\u5b83\u63a5\u53d7\u4e00\u4e2a\u51fd\u6570 <code>f<\/code> \u548c\u4e00\u4e2a\u53c2\u6570 <code>x<\/code>\uff0c\u5e76\u8fd4\u56de <code>f(x)<\/code> \u7684\u7ed3\u679c\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u5c06 <code>f<\/code> \u4f5c\u4e3a\u53c2\u6570\u4f20\u9012\u7ed9 <code>apply_function<\/code> \u6765\u5b9e\u73b0\u8fd9\u4e00\u529f\u80fd\u3002<\/p>\n<\/p>\n<p><h2>\u4e00\u3001\u4f7f\u7528\u51fd\u6570\u540d<\/h2>\n<\/p>\n<p><h3>1\u3001\u76f4\u63a5\u4f20\u9012\u51fd\u6570\u540d<\/h3>\n<\/p>\n<p><p>\u76f4\u63a5\u4f20\u9012\u51fd\u6570\u540d\u662f\u6700\u5e38\u89c1\u7684\u65b9\u6cd5\u4e4b\u4e00\u3002\u4f60\u53ea\u9700\u5c06\u51fd\u6570\u540d\u4f5c\u4e3a\u53c2\u6570\u4f20\u9012\u7ed9\u53e6\u4e00\u4e2a\u51fd\u6570\u5373\u53ef\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def add_one(x):<\/p>\n<p>    return x + 1<\/p>\n<p>def apply_function(f, x):<\/p>\n<p>    return f(x)<\/p>\n<p>result = apply_function(add_one, 5)<\/p>\n<p>print(result)  # \u8f93\u51fa: 6<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>2\u3001\u4f7f\u7528\u5185\u7f6e\u51fd\u6570<\/h3>\n<\/p>\n<p><p>Python \u63d0\u4f9b\u4e86\u8bb8\u591a\u5185\u7f6e\u51fd\u6570\uff0c\u53ef\u4ee5\u4f5c\u4e3a\u53c2\u6570\u4f20\u9012\u7ed9\u5176\u4ed6\u51fd\u6570\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">numbers = [1, 2, 3, 4, 5]<\/p>\n<h2><strong>\u4f7f\u7528\u5185\u7f6e\u51fd\u6570sum<\/strong><\/h2>\n<p>total = sum(numbers)<\/p>\n<p>print(total)  # \u8f93\u51fa: 15<\/p>\n<h2><strong>\u4f7f\u7528\u5185\u7f6e\u51fd\u6570len<\/strong><\/h2>\n<p>length = len(numbers)<\/p>\n<p>print(length)  # \u8f93\u51fa: 5<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h2>\u4e8c\u3001\u4f7f\u7528lambda\u8868\u8fbe\u5f0f<\/h2>\n<\/p>\n<p><h3>1\u3001\u5b9a\u4e49\u533f\u540d\u51fd\u6570<\/h3>\n<\/p>\n<p><p>lambda \u8868\u8fbe\u5f0f\u662f\u4e00\u79cd\u521b\u5efa\u533f\u540d\u51fd\u6570\u7684\u65b9\u6cd5\uff0c\u975e\u5e38\u9002\u5408\u7528\u4e8e\u9700\u8981\u7b80\u77ed\u51fd\u6570\u7684\u573a\u666f\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def apply_function(f, x):<\/p>\n<p>    return f(x)<\/p>\n<p>result = apply_function(lambda x: x * 2, 5)<\/p>\n<p>print(result)  # \u8f93\u51fa: 10<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>2\u3001\u7ed3\u5408\u5185\u7f6e\u51fd\u6570\u4f7f\u7528<\/h3>\n<\/p>\n<p><p>lambda \u8868\u8fbe\u5f0f\u53ef\u4ee5\u4e0e\u5185\u7f6e\u51fd\u6570\u7ed3\u5408\u4f7f\u7528\uff0c\u589e\u5f3a\u4ee3\u7801\u7684\u7075\u6d3b\u6027\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">numbers = [1, 2, 3, 4, 5]<\/p>\n<h2><strong>\u4f7f\u7528lambda\u8868\u8fbe\u5f0f\u6c42\u5e73\u65b9<\/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]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h2>\u4e09\u3001\u4f7f\u7528\u88c5\u9970\u5668<\/h2>\n<\/p>\n<p><h3>1\u3001\u5b9a\u4e49\u88c5\u9970\u5668\u51fd\u6570<\/h3>\n<\/p>\n<p><p>\u88c5\u9970\u5668\u662f\u4e00\u79cd\u7279\u6b8a\u7684\u51fd\u6570\uff0c\u5b83\u63a5\u53d7\u4e00\u4e2a\u51fd\u6570\u4f5c\u4e3a\u53c2\u6570\uff0c\u5e76\u8fd4\u56de\u4e00\u4e2a\u65b0\u7684\u51fd\u6570\u3002\u88c5\u9970\u5668\u53ef\u4ee5\u7528\u4e8e\u4fee\u6539\u6216\u6269\u5c55\u88ab\u88c5\u9970\u51fd\u6570\u7684\u884c\u4e3a\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def my_decorator(func):<\/p>\n<p>    def wrapper(*args, kwargs):<\/p>\n<p>        print(&quot;Something is happening before the function is called.&quot;)<\/p>\n<p>        result = func(*args, kwargs)<\/p>\n<p>        print(&quot;Something is happening after the function is called.&quot;)<\/p>\n<p>        return result<\/p>\n<p>    return wrapper<\/p>\n<p>@my_decorator<\/p>\n<p>def say_hello(name):<\/p>\n<p>    print(f&quot;Hello, {name}!&quot;)<\/p>\n<p>say_hello(&quot;Alice&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>2\u3001\u7ec4\u5408\u591a\u4e2a\u88c5\u9970\u5668<\/h3>\n<\/p>\n<p><p>\u4f60\u53ef\u4ee5\u5c06\u591a\u4e2a\u88c5\u9970\u5668\u7ec4\u5408\u5728\u4e00\u8d77\uff0c\u4ee5\u5b9e\u73b0\u66f4\u590d\u6742\u7684\u529f\u80fd\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def decorator1(func):<\/p>\n<p>    def wrapper(*args, kwargs):<\/p>\n<p>        print(&quot;Decorator 1&quot;)<\/p>\n<p>        return func(*args, kwargs)<\/p>\n<p>    return wrapper<\/p>\n<p>def decorator2(func):<\/p>\n<p>    def wrapper(*args, kwargs):<\/p>\n<p>        print(&quot;Decorator 2&quot;)<\/p>\n<p>        return func(*args, kwargs)<\/p>\n<p>    return wrapper<\/p>\n<p>@decorator1<\/p>\n<p>@decorator2<\/p>\n<p>def say_goodbye(name):<\/p>\n<p>    print(f&quot;Goodbye, {name}!&quot;)<\/p>\n<p>say_goodbye(&quot;Bob&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h2>\u56db\u3001\u4f7f\u7528\u51fd\u6570\u5bf9\u8c61<\/h2>\n<\/p>\n<p><h3>1\u3001\u5c06\u51fd\u6570\u5b58\u50a8\u5728\u6570\u636e\u7ed3\u6784\u4e2d<\/h3>\n<\/p>\n<p><p>\u4f60\u53ef\u4ee5\u5c06\u51fd\u6570\u5b58\u50a8\u5728\u5217\u8868\u6216\u5b57\u5178\u7b49\u6570\u636e\u7ed3\u6784\u4e2d\uff0c\u4ee5\u5b9e\u73b0\u66f4\u52a0\u7075\u6d3b\u7684\u51fd\u6570\u8c03\u7528\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def add(x, y):<\/p>\n<p>    return x + y<\/p>\n<p>def subtract(x, y):<\/p>\n<p>    return x - y<\/p>\n<p>operations = {<\/p>\n<p>    &quot;add&quot;: add,<\/p>\n<p>    &quot;subtract&quot;: subtract<\/p>\n<p>}<\/p>\n<p>result = operations[&quot;add&quot;](5, 3)<\/p>\n<p>print(result)  # \u8f93\u51fa: 8<\/p>\n<p>result = operations[&quot;subtract&quot;](5, 3)<\/p>\n<p>print(result)  # \u8f93\u51fa: 2<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>2\u3001\u52a8\u6001\u9009\u62e9\u51fd\u6570<\/h3>\n<\/p>\n<p><p>\u901a\u8fc7\u5c06\u51fd\u6570\u5b58\u50a8\u5728\u6570\u636e\u7ed3\u6784\u4e2d\uff0c\u4f60\u53ef\u4ee5\u6839\u636e\u6761\u4ef6\u52a8\u6001\u9009\u62e9\u8981\u8c03\u7528\u7684\u51fd\u6570\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def multiply(x, y):<\/p>\n<p>    return x * y<\/p>\n<p>def divide(x, y):<\/p>\n<p>    if y != 0:<\/p>\n<p>        return x \/ y<\/p>\n<p>    else:<\/p>\n<p>        r<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>se ValueError(&quot;Cannot divide by zero&quot;)<\/p>\n<p>operations = {<\/p>\n<p>    &quot;multiply&quot;: multiply,<\/p>\n<p>    &quot;divide&quot;: divide<\/p>\n<p>}<\/p>\n<p>operation_name = &quot;divide&quot;<\/p>\n<p>result = operations[operation_name](10, 2)<\/p>\n<p>print(result)  # \u8f93\u51fa: 5.0<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h2>\u4e94\u3001\u5e94\u7528\u573a\u666f<\/h2>\n<\/p>\n<p><h3>1\u3001\u9ad8\u9636\u51fd\u6570<\/h3>\n<\/p>\n<p><p>\u9ad8\u9636\u51fd\u6570\u662f\u6307\u63a5\u53d7\u4e00\u4e2a\u6216\u591a\u4e2a\u51fd\u6570\u4f5c\u4e3a\u53c2\u6570\uff0c\u6216\u8005\u8fd4\u56de\u4e00\u4e2a\u51fd\u6570\u4f5c\u4e3a\u7ed3\u679c\u7684\u51fd\u6570\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def higher_order_function(f, x, y):<\/p>\n<p>    return f(x, y)<\/p>\n<p>result = higher_order_function(add, 2, 3)<\/p>\n<p>print(result)  # \u8f93\u51fa: 5<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>2\u3001\u56de\u8c03\u51fd\u6570<\/h3>\n<\/p>\n<p><p>\u56de\u8c03\u51fd\u6570\u662f\u4e00\u79cd\u5728\u7279\u5b9a\u4e8b\u4ef6\u53d1\u751f\u65f6\u8c03\u7528\u7684\u51fd\u6570\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def on_click(callback):<\/p>\n<p>    print(&quot;Button clicked!&quot;)<\/p>\n<p>    callback()<\/p>\n<p>def button_clicked():<\/p>\n<p>    print(&quot;Button click event handled&quot;)<\/p>\n<p>on_click(button_clicked)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>3\u3001\u51fd\u6570\u5f0f\u7f16\u7a0b<\/h3>\n<\/p>\n<p><p>\u51fd\u6570\u5f0f\u7f16\u7a0b\u662f\u4e00\u79cd\u7f16\u7a0b\u8303\u5f0f\uff0c\u5b83\u5f3a\u8c03\u4f7f\u7528\u51fd\u6570\u6765\u5904\u7406\u6570\u636e\u548c\u903b\u8f91\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def filter_even_numbers(numbers):<\/p>\n<p>    return list(filter(lambda x: x % 2 == 0, numbers))<\/p>\n<p>numbers = [1, 2, 3, 4, 5, 6]<\/p>\n<p>even_numbers = filter_even_numbers(numbers)<\/p>\n<p>print(even_numbers)  # \u8f93\u51fa: [2, 4, 6]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>4\u3001\u4e8b\u4ef6\u9a71\u52a8\u7f16\u7a0b<\/h3>\n<\/p>\n<p><p>\u5728\u4e8b\u4ef6\u9a71\u52a8\u7f16\u7a0b\u4e2d\uff0c\u51fd\u6570\u901a\u5e38\u4f5c\u4e3a\u4e8b\u4ef6\u5904\u7406\u7a0b\u5e8f\u4f20\u9012\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def on_event(event_handler):<\/p>\n<p>    event = {&quot;type&quot;: &quot;click&quot;, &quot;target&quot;: &quot;button&quot;}<\/p>\n<p>    event_handler(event)<\/p>\n<p>def handle_event(event):<\/p>\n<p>    print(f&quot;Event type: {event[&#39;type&#39;]}, Event target: {event[&#39;target&#39;]}&quot;)<\/p>\n<p>on_event(handle_event)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u5c06\u51fd\u6570\u4f5c\u4e3a\u53c2\u6570\u4f20\u9012\uff0c\u4f60\u53ef\u4ee5\u7f16\u5199\u66f4\u52a0\u7075\u6d3b\u548c\u53ef\u91cd\u7528\u7684\u4ee3\u7801\u3002\u8fd9\u79cd\u6280\u672f\u5728Python\u7f16\u7a0b\u4e2d\u975e\u5e38\u5e38\u89c1\uff0c\u53ef\u4ee5\u5e2e\u52a9\u4f60\u89e3\u51b3\u8bb8\u591a\u590d\u6742\u7684\u95ee\u9898\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u5c06\u51fd\u6570\u4f5c\u4e3a\u53c2\u6570\u4f20\u9012\u7ed9\u53e6\u4e00\u4e2a\u51fd\u6570\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u51fd\u6570\u662f\u4e00\u7b49\u516c\u6c11\uff0c\u610f\u5473\u7740\u5b83\u4eec\u53ef\u4ee5\u50cf\u5176\u4ed6\u4efb\u4f55\u5bf9\u8c61\u4e00\u6837\u88ab\u4f20\u9012\u3002\u8981\u5c06\u4e00\u4e2a\u51fd\u6570\u4f5c\u4e3a\u53c2\u6570\u4f20\u9012\uff0c\u53ea\u9700\u5728\u5b9a\u4e49\u53e6\u4e00\u4e2a\u51fd\u6570\u65f6\u5c06\u5176\u4f5c\u4e3a\u53c2\u6570\u6dfb\u52a0\uff0c\u5e76\u5728\u51fd\u6570\u4f53\u5185\u8c03\u7528\u5b83\u3002\u4f8b\u5982\uff1a<\/p>\n<pre><code class=\"language-python\">def greet(name):\n    return f&quot;Hello, {name}!&quot;\n\ndef process_greeting(func, name):\n    return func(name)\n\nresult = process_greeting(greet, &quot;Alice&quot;)\nprint(result)  # \u8f93\u51fa: Hello, Alice!\n<\/code><\/pre>\n<p>\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u60a8\u53ef\u4ee5\u8f7b\u677e\u5730\u5728\u4e0d\u540c\u7684\u4e0a\u4e0b\u6587\u4e2d\u91cd\u7528\u51fd\u6570\u3002<\/p>\n<p><strong>\u4f7f\u7528lambda\u8868\u8fbe\u5f0f\u4f5c\u4e3a\u53c2\u6570\u4f20\u9012\u7684\u4f18\u52bf\u662f\u4ec0\u4e48\uff1f<\/strong><br \/>\u4f7f\u7528lambda\u8868\u8fbe\u5f0f\u53ef\u4ee5\u5feb\u901f\u5b9a\u4e49\u7b80\u5355\u7684\u533f\u540d\u51fd\u6570\uff0c\u8fd9\u5728\u5c06\u51fd\u6570\u4f5c\u4e3a\u53c2\u6570\u4f20\u9012\u65f6\u975e\u5e38\u65b9\u4fbf\u3002\u4f8b\u5982\uff0c\u60a8\u53ef\u4ee5\u76f4\u63a5\u4f20\u9012\u4e00\u4e2a\u7b80\u5355\u7684\u8ba1\u7b97\u903b\u8f91\uff0c\u800c\u4e0d\u5fc5\u4e8b\u5148\u5b9a\u4e49\u4e00\u4e2a\u5b8c\u6574\u7684\u51fd\u6570\u3002\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n<pre><code class=\"language-python\">result = process_greeting(lambda x: x.upper(), &quot;hello&quot;)\nprint(result)  # \u8f93\u51fa: HELLO\n<\/code><\/pre>\n<p>\u8fd9\u79cd\u65b9\u5f0f\u5728\u5904\u7406\u7b80\u5355\u7684\u903b\u8f91\u65f6\u975e\u5e38\u9ad8\u6548\uff0c\u4ee3\u7801\u4e5f\u66f4\u52a0\u7b80\u6d01\u3002<\/p>\n<p><strong>\u5728\u4f20\u9012\u51fd\u6570\u53c2\u6570\u65f6\uff0c\u6709\u54ea\u4e9b\u5e38\u89c1\u7684\u9519\u8bef\u9700\u8981\u907f\u514d\uff1f<\/strong><br \/>\u5728\u5c06\u51fd\u6570\u4f5c\u4e3a\u53c2\u6570\u4f20\u9012\u65f6\uff0c\u4e00\u4e9b\u5e38\u89c1\u7684\u9519\u8bef\u5305\u62ec\uff1a\u5fd8\u8bb0\u5728\u51fd\u6570\u8c03\u7528\u65f6\u6dfb\u52a0\u62ec\u53f7\u3001\u4f20\u9012\u4e0d\u517c\u5bb9\u7684\u53c2\u6570\u7c7b\u578b\u3001\u4ee5\u53ca\u5728\u4f7f\u7528\u95ed\u5305\u65f6\u672a\u6b63\u786e\u5f15\u7528\u5916\u90e8\u53d8\u91cf\u3002\u786e\u4fdd\u51fd\u6570\u7684\u53c2\u6570\u4e0e\u9884\u671f\u4e00\u81f4\uff0c\u5e76\u4ed4\u7ec6\u68c0\u67e5\u4efb\u4f55\u95ed\u5305\u4e2d\u4f7f\u7528\u7684\u53d8\u91cf\uff0c\u80fd\u591f\u6709\u6548\u51cf\u5c11\u9519\u8bef\u53d1\u751f\u7684\u51e0\u7387\u3002\u4f8b\u5982\uff1a<\/p>\n<pre><code class=\"language-python\">def add(a, b):\n    return a + b\n\ndef calculate(func, x, y):\n    return func(x, y)\n\nresult = calculate(add, 5, 3)  # \u6b63\u786e\u4f7f\u7528\nprint(result)  # \u8f93\u51fa: 8\n<\/code><\/pre>\n<p>\u68c0\u67e5\u51fd\u6570\u7b7e\u540d\u548c\u53c2\u6570\u7c7b\u578b\uff0c\u53ef\u4ee5\u786e\u4fdd\u4ee3\u7801\u7684\u53ef\u9760\u6027\u548c\u53ef\u8bfb\u6027\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\uff0c\u5c06\u51fd\u6570\u4f5c\u4e3a\u53c2\u6570\u4f20\u9012\u7684\u65b9\u6cd5\u5305\u62ec\uff1a\u4f7f\u7528\u51fd\u6570\u540d\u3001lambda\u8868\u8fbe\u5f0f\u3001\u88c5\u9970\u5668\u7b49\u3002 \u5176\u4e2d\uff0c\u6700\u5e38\u7528\u7684\u65b9\u6cd5 [&hellip;]","protected":false},"author":3,"featured_media":1123547,"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\/1123537"}],"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=1123537"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1123537\/revisions"}],"predecessor-version":[{"id":1123550,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1123537\/revisions\/1123550"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1123547"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1123537"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1123537"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1123537"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}