{"id":1087873,"date":"2025-01-08T13:39:08","date_gmt":"2025-01-08T05:39:08","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1087873.html"},"modified":"2025-01-08T13:39:10","modified_gmt":"2025-01-08T05:39:10","slug":"python%e5%a6%82%e4%bd%95%e8%ae%a9%e4%b8%8a%e4%b8%80%e6%ad%a5%e6%97%a0%e6%95%88-2","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1087873.html","title":{"rendered":"Python\u5982\u4f55\u8ba9\u4e0a\u4e00\u6b65\u65e0\u6548"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24200613\/f60942bb-2205-4c37-adc9-a11051100510.webp\" alt=\"Python\u5982\u4f55\u8ba9\u4e0a\u4e00\u6b65\u65e0\u6548\" \/><\/p>\n<p><p> <strong>Python\u5982\u4f55\u8ba9\u4e0a\u4e00\u6b65\u65e0\u6548\uff1f\u53ef\u4ee5\u4f7f\u7528\u56de\u6eaf\u3001\u64a4\u9500\u64cd\u4f5c\u3001try-except\u8bed\u53e5\u3001\u4e0a\u4e0b\u6587\u7ba1\u7406\u5668\u3002<\/strong> \u5176\u4e2d\uff0c\u4f7f\u7528try-except\u8bed\u53e5\u662f\u6700\u5e38\u89c1\u7684\u65b9\u6cd5\u4e4b\u4e00\uff0c\u53ef\u4ee5\u6709\u6548\u5730\u6355\u83b7\u5f02\u5e38\u5e76\u5904\u7406\uff0c\u4ece\u800c\u4f7f\u4e0a\u4e00\u6b65\u64cd\u4f5c\u65e0\u6548\u3002\u5177\u4f53\u6765\u8bf4\uff0ctry-except\u8bed\u53e5\u53ef\u4ee5\u6355\u83b7\u5728try\u5757\u4e2d\u53d1\u751f\u7684\u4efb\u4f55\u5f02\u5e38\uff0c\u5e76\u5728except\u5757\u4e2d\u5904\u7406\u8fd9\u4e9b\u5f02\u5e38\uff0c\u4ece\u800c\u907f\u514d\u7a0b\u5e8f\u5d29\u6e83\uff0c\u5e76\u53ef\u4ee5\u9009\u62e9\u6027\u5730\u56de\u6eda\u5230\u4e4b\u524d\u7684\u72b6\u6001\u3002<\/p>\n<\/p>\n<h2><strong>\u4e00\u3001\u56de\u6eaf\u64cd\u4f5c<\/strong><\/h2>\n<p><p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u6211\u4eec\u53ef\u80fd\u9700\u8981\u5b9e\u73b0\u56de\u6eaf\u64cd\u4f5c\uff0c\u4f7f\u5f97\u67d0\u4e00\u6b65\u64cd\u4f5c\u65e0\u6548\u3002Python\u4e2d\u6ca1\u6709\u5185\u7f6e\u7684\u56de\u6eaf\u673a\u5236\uff0c\u4f46\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4fdd\u5b58\u4e4b\u524d\u7684\u72b6\u6001\u6765\u5b9e\u73b0\u8fd9\u4e00\u529f\u80fd\u3002\u4f8b\u5982\uff0c\u4f7f\u7528\u5217\u8868\u6216\u8005\u5b57\u5178\u6765\u4fdd\u5b58\u4e4b\u524d\u7684\u64cd\u4f5c\u72b6\u6001\uff0c\u7136\u540e\u5728\u9700\u8981\u65f6\u6062\u590d\u5230\u4e4b\u524d\u7684\u72b6\u6001\u3002<\/p>\n<\/p>\n<p><h2>\u793a\u4f8b\u4ee3\u7801<\/h2>\n<\/p>\n<p><pre><code class=\"language-python\">class UndoableList:<\/p>\n<p>    def __init__(self):<\/p>\n<p>        self.list = []<\/p>\n<p>        self.history = []<\/p>\n<p>    def add(self, item):<\/p>\n<p>        self.history.append(list(self.list))  # \u4fdd\u5b58\u5f53\u524d\u72b6\u6001<\/p>\n<p>        self.list.append(item)<\/p>\n<p>    def undo(self):<\/p>\n<p>        if self.history:<\/p>\n<p>            self.list = self.history.pop()  # \u6062\u590d\u5230\u4e4b\u524d\u7684\u72b6\u6001<\/p>\n<p>    def __str__(self):<\/p>\n<p>        return str(self.list)<\/p>\n<h2><strong>\u4f7f\u7528\u793a\u4f8b<\/strong><\/h2>\n<p>u_list = UndoableList()<\/p>\n<p>u_list.add(1)<\/p>\n<p>u_list.add(2)<\/p>\n<p>print(u_list)  # \u8f93\u51fa: [1, 2]<\/p>\n<p>u_list.undo()<\/p>\n<p>print(u_list)  # \u8f93\u51fa: [1]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u5b9a\u4e49\u4e86\u4e00\u4e2a<code>UndoableList<\/code>\u7c7b\uff0c\u8be5\u7c7b\u5177\u6709\u6dfb\u52a0\u5143\u7d20\u548c\u64a4\u9500\u64cd\u4f5c\u7684\u529f\u80fd\u3002\u6bcf\u6b21\u6dfb\u52a0\u5143\u7d20\u65f6\uff0c\u6211\u4eec\u5c06\u5f53\u524d\u72b6\u6001\u4fdd\u5b58\u5230<code>history<\/code>\u4e2d\u3002\u5f53\u9700\u8981\u64a4\u9500\u64cd\u4f5c\u65f6\uff0c\u6211\u4eec\u4ece<code>history<\/code>\u4e2d\u6062\u590d\u4e4b\u524d\u7684\u72b6\u6001\u3002<\/p>\n<\/p>\n<h2><strong>\u4e8c\u3001\u64a4\u9500\u64cd\u4f5c<\/strong><\/h2>\n<p><p>\u9664\u4e86\u624b\u52a8\u5b9e\u73b0\u56de\u6eaf\u64cd\u4f5c\uff0c\u6211\u4eec\u8fd8\u53ef\u4ee5\u4f7f\u7528\u64a4\u9500\u64cd\u4f5c\u6765\u4f7f\u4e0a\u4e00\u6b65\u64cd\u4f5c\u65e0\u6548\u3002Python\u4e2d\u6ca1\u6709\u76f4\u63a5\u7684\u64a4\u9500\u529f\u80fd\uff0c\u4f46\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u4e0a\u4e0b\u6587\u7ba1\u7406\u5668\u6765\u5b9e\u73b0\u8fd9\u4e00\u529f\u80fd\u3002<\/p>\n<\/p>\n<p><h2>\u793a\u4f8b\u4ee3\u7801<\/h2>\n<\/p>\n<p><pre><code class=\"language-python\">class Transaction:<\/p>\n<p>    def __init__(self):<\/p>\n<p>        self.actions = []<\/p>\n<p>    def execute(self, action):<\/p>\n<p>        try:<\/p>\n<p>            action()<\/p>\n<p>            self.actions.append(action)<\/p>\n<p>        except Exception as e:<\/p>\n<p>            print(f&quot;Error: {e}&quot;)<\/p>\n<p>            self.rollback()<\/p>\n<p>    def rollback(self):<\/p>\n<p>        for action in reversed(self.actions):<\/p>\n<p>            action.undo()<\/p>\n<h2><strong>\u793a\u4f8b\u64cd\u4f5c\u7c7b<\/strong><\/h2>\n<p>class Action:<\/p>\n<p>    def __init__(self, name):<\/p>\n<p>        self.name = name<\/p>\n<p>    def __call__(self):<\/p>\n<p>        print(f&quot;Executing {self.name}&quot;)<\/p>\n<p>    def undo(self):<\/p>\n<p>        print(f&quot;Undoing {self.name}&quot;)<\/p>\n<h2><strong>\u4f7f\u7528\u793a\u4f8b<\/strong><\/h2>\n<p>transaction = Transaction()<\/p>\n<p>action1 = Action(&quot;Action 1&quot;)<\/p>\n<p>action2 = Action(&quot;Action 2&quot;)<\/p>\n<p>transaction.execute(action1)<\/p>\n<p>transaction.execute(action2)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u5b9a\u4e49\u4e86\u4e00\u4e2a<code>Transaction<\/code>\u7c7b\uff0c\u7528\u4e8e\u7ba1\u7406\u4e00\u7cfb\u5217\u64cd\u4f5c\u3002\u6bcf\u6b21\u6267\u884c\u64cd\u4f5c\u65f6\uff0c\u6211\u4eec\u5c06\u64cd\u4f5c\u4fdd\u5b58\u5230<code>actions<\/code>\u4e2d\u3002\u5982\u679c\u53d1\u751f\u5f02\u5e38\uff0c\u6211\u4eec\u5c06\u8c03\u7528<code>rollback<\/code>\u65b9\u6cd5\u6765\u64a4\u9500\u4e4b\u524d\u7684\u6240\u6709\u64cd\u4f5c\u3002\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u6211\u4eec\u53ef\u4ee5\u5b9e\u73b0\u64a4\u9500\u64cd\u4f5c\uff0c\u4f7f\u5f97\u4e0a\u4e00\u6b65\u64cd\u4f5c\u65e0\u6548\u3002<\/p>\n<\/p>\n<h2><strong>\u4e09\u3001try-except\u8bed\u53e5<\/strong><\/h2>\n<p><p>\u4f7f\u7528try-except\u8bed\u53e5\u662f\u5904\u7406\u5f02\u5e38\u7684\u5e38\u89c1\u65b9\u6cd5\u4e4b\u4e00\u3002\u6211\u4eec\u53ef\u4ee5\u5728try\u5757\u4e2d\u6267\u884c\u53ef\u80fd\u4f1a\u5f15\u53d1\u5f02\u5e38\u7684\u4ee3\u7801\uff0c\u5e76\u5728except\u5757\u4e2d\u5904\u7406\u5f02\u5e38\u3002\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u6211\u4eec\u53ef\u4ee5\u6355\u83b7\u5f02\u5e38\u5e76\u5904\u7406\uff0c\u4ece\u800c\u907f\u514d\u7a0b\u5e8f\u5d29\u6e83\uff0c\u5e76\u53ef\u4ee5\u9009\u62e9\u6027\u5730\u56de\u6eda\u5230\u4e4b\u524d\u7684\u72b6\u6001\u3002<\/p>\n<\/p>\n<p><h2>\u793a\u4f8b\u4ee3\u7801<\/h2>\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 as e:<\/p>\n<p>        print(f&quot;Error: {e}&quot;)<\/p>\n<p>        return None<\/p>\n<p>    return result<\/p>\n<h2><strong>\u4f7f\u7528\u793a\u4f8b<\/strong><\/h2>\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><p>\u5728\u4e0a\u8ff0\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u5b9a\u4e49\u4e86\u4e00\u4e2a<code>divide<\/code>\u51fd\u6570\uff0c\u7528\u4e8e\u6267\u884c\u9664\u6cd5\u64cd\u4f5c\u3002\u5728try\u5757\u4e2d\uff0c\u6211\u4eec\u6267\u884c\u9664\u6cd5\u64cd\u4f5c\uff0c\u5982\u679c\u53d1\u751f\u9664\u96f6\u5f02\u5e38\uff0c\u6211\u4eec\u5c06\u5728except\u5757\u4e2d\u6355\u83b7\u5f02\u5e38\u5e76\u6253\u5370\u9519\u8bef\u4fe1\u606f\u3002\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u6211\u4eec\u53ef\u4ee5\u907f\u514d\u7a0b\u5e8f\u5d29\u6e83\uff0c\u5e76\u53ef\u4ee5\u9009\u62e9\u6027\u5730\u5904\u7406\u5f02\u5e38\u3002<\/p>\n<\/p>\n<h2><strong>\u56db\u3001\u4e0a\u4e0b\u6587\u7ba1\u7406\u5668<\/strong><\/h2>\n<p><p>Python\u4e2d\u7684\u4e0a\u4e0b\u6587\u7ba1\u7406\u5668\u63d0\u4f9b\u4e86\u4e00\u79cd\u4f18\u96c5\u7684\u65b9\u6cd5\u6765\u7ba1\u7406\u8d44\u6e90\uff0c\u4f8b\u5982\u6587\u4ef6\u3001\u7f51\u7edc\u8fde\u63a5\u7b49\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u4e0a\u4e0b\u6587\u7ba1\u7406\u5668\u6765\u786e\u4fdd\u8d44\u6e90\u5728\u4f7f\u7528\u540e\u88ab\u6b63\u786e\u91ca\u653e\uff0c\u4ece\u800c\u907f\u514d\u8d44\u6e90\u6cc4\u6f0f\u3002<\/p>\n<\/p>\n<p><h2>\u793a\u4f8b\u4ee3\u7801<\/h2>\n<\/p>\n<p><pre><code class=\"language-python\">class FileManager:<\/p>\n<p>    def __init__(self, file_name, mode):<\/p>\n<p>        self.file_name = file_name<\/p>\n<p>        self.mode = mode<\/p>\n<p>    def __enter__(self):<\/p>\n<p>        self.file = open(self.file_name, self.mode)<\/p>\n<p>        return self.file<\/p>\n<p>    def __exit__(self, exc_type, exc_value, traceback):<\/p>\n<p>        self.file.close()<\/p>\n<h2><strong>\u4f7f\u7528\u793a\u4f8b<\/strong><\/h2>\n<p>with FileManager(&quot;test.txt&quot;, &quot;w&quot;) as file:<\/p>\n<p>    file.write(&quot;Hello, World!&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u5b9a\u4e49\u4e86\u4e00\u4e2a<code>FileManager<\/code>\u7c7b\uff0c\u8be5\u7c7b\u5b9e\u73b0\u4e86\u4e0a\u4e0b\u6587\u7ba1\u7406\u5668\u534f\u8bae\u3002\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528with\u8bed\u53e5\u6765\u7ba1\u7406\u6587\u4ef6\u8d44\u6e90\uff0c\u786e\u4fdd\u6587\u4ef6\u5728\u4f7f\u7528\u540e\u88ab\u6b63\u786e\u5173\u95ed\u3002<\/p>\n<\/p>\n<p><p>\u7efc\u4e0a\u6240\u8ff0\uff0cPython\u63d0\u4f9b\u4e86\u591a\u79cd\u65b9\u6cd5\u6765\u5b9e\u73b0\u4f7f\u4e0a\u4e00\u6b65\u64cd\u4f5c\u65e0\u6548\uff0c\u5305\u62ec\u56de\u6eaf\u64cd\u4f5c\u3001\u64a4\u9500\u64cd\u4f5c\u3001try-except\u8bed\u53e5\u548c\u4e0a\u4e0b\u6587\u7ba1\u7406\u5668\u3002\u901a\u8fc7\u5408\u7406\u4f7f\u7528\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u6211\u4eec\u53ef\u4ee5\u6709\u6548\u5730\u5904\u7406\u5f02\u5e38\uff0c\u786e\u4fdd\u7a0b\u5e8f\u7684\u7a33\u5b9a\u6027\u548c\u53ef\u9760\u6027\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u64a4\u9500\u4e0a\u4e00\u6b65\u7684\u64cd\u4f5c\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u64a4\u9500\u4e0a\u4e00\u6b65\u64cd\u4f5c\u7684\u65b9\u5f0f\u4f9d\u8d56\u4e8e\u5177\u4f53\u7684\u5e94\u7528\u573a\u666f\u3002\u4f8b\u5982\uff0c\u5728\u4ea4\u4e92\u5f0f\u73af\u5883\u4e2d\uff08\u5982Jupyter Notebook\uff09\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7\u91cd\u65b0\u8fd0\u884c\u5355\u5143\u683c\u6216\u4fee\u6539\u4ee3\u7801\u6765\u5b9e\u73b0\u64a4\u9500\u6548\u679c\u3002\u5728\u66f4\u590d\u6742\u7684\u5e94\u7528\u4e2d\uff0c\u4f8b\u5982\u56fe\u5f62\u7528\u6237\u754c\u9762\uff08GUI\uff09\u7a0b\u5e8f\uff0c\u901a\u5e38\u9700\u8981\u5b9e\u73b0\u4e00\u4e2a\u64a4\u9500\u529f\u80fd\uff0c\u53ef\u80fd\u9700\u8981\u4f7f\u7528\u6808\u7ed3\u6784\u6765\u5b58\u50a8\u5148\u524d\u7684\u72b6\u6001\uff0c\u4ee5\u4fbf\u968f\u65f6\u6062\u590d\u3002<\/p>\n<p><strong>\u662f\u5426\u53ef\u4ee5\u4f7f\u7528Python\u5e93\u6765\u5b9e\u73b0\u64a4\u9500\u529f\u80fd\uff1f<\/strong><br \/>\u662f\u7684\uff0c\u6709\u4e00\u4e9bPython\u5e93\u53ef\u4ee5\u5e2e\u52a9\u4f60\u5b9e\u73b0\u64a4\u9500\u529f\u80fd\u3002\u6bd4\u5982\u5728\u56fe\u5f62\u754c\u9762\u5f00\u53d1\u4e2d\uff0cTkinter\u548cPyQt\u7b49\u5e93\u53ef\u4ee5\u901a\u8fc7\u4fe1\u53f7\u548c\u69fd\u673a\u5236\u6765\u6355\u6349\u7528\u6237\u7684\u64cd\u4f5c\uff0c\u4ece\u800c\u5b9e\u73b0\u64a4\u9500\u548c\u91cd\u505a\u529f\u80fd\u3002\u6b64\u5916\uff0c\u4f7f\u7528\u6570\u636e\u7ed3\u6784\u5982\u5217\u8868\u6216\u6808\u53ef\u4ee5\u624b\u52a8\u7ba1\u7406\u64cd\u4f5c\u5386\u53f2\uff0c\u4ee5\u4fbf\u5728\u9700\u8981\u65f6\u8fdb\u884c\u64a4\u9500\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728Python\u4e2d\u5b9e\u73b0\u7b80\u5355\u7684\u64a4\u9500\u673a\u5236\uff1f<\/strong><br \/>\u5b9e\u73b0\u7b80\u5355\u7684\u64a4\u9500\u673a\u5236\u901a\u5e38\u9700\u8981\u7ef4\u62a4\u4e00\u4e2a\u64cd\u4f5c\u5386\u53f2\u8bb0\u5f55\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u4f7f\u7528\u4e00\u4e2a\u5217\u8868\u6765\u4fdd\u5b58\u6bcf\u6b21\u7684\u64cd\u4f5c\u72b6\u6001\u3002\u5f53\u7528\u6237\u9700\u8981\u64a4\u9500\u65f6\uff0c\u53ea\u9700\u4ece\u5386\u53f2\u8bb0\u5f55\u4e2d\u5f39\u51fa\u6700\u540e\u4e00\u4e2a\u72b6\u6001\u5e76\u6062\u590d\u5230\u8be5\u72b6\u6001\u3002\u8fd9\u79cd\u65b9\u6cd5\u7b80\u5355\u6613\u61c2\uff0c\u9002\u5408\u5c0f\u578b\u9879\u76ee\u6216\u5b66\u4e60\u76ee\u7684\u3002\u793a\u4f8b\u4ee3\u7801\u53ef\u4ee5\u53c2\u8003\u4ee5\u4e0b\u5f62\u5f0f\uff1a<\/p>\n<pre><code class=\"language-python\">history = []\n\ndef perform_action(action):\n    history.append(action)\n    # \u6267\u884c\u64cd\u4f5c\u7684\u4ee3\u7801\n\ndef undo():\n    if history:\n        last_action = history.pop()\n        # \u64a4\u9500\u64cd\u4f5c\u7684\u4ee3\u7801\n<\/code><\/pre>\n<p>\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u7528\u6237\u53ef\u4ee5\u8f7b\u677e\u7ba1\u7406\u64cd\u4f5c\u7684\u72b6\u6001\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u5982\u4f55\u8ba9\u4e0a\u4e00\u6b65\u65e0\u6548\uff1f\u53ef\u4ee5\u4f7f\u7528\u56de\u6eaf\u3001\u64a4\u9500\u64cd\u4f5c\u3001try-except\u8bed\u53e5\u3001\u4e0a\u4e0b\u6587\u7ba1\u7406\u5668\u3002 \u5176\u4e2d\uff0c\u4f7f\u7528tr [&hellip;]","protected":false},"author":3,"featured_media":1087881,"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\/1087873"}],"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=1087873"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1087873\/revisions"}],"predecessor-version":[{"id":1087882,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1087873\/revisions\/1087882"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1087881"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1087873"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1087873"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1087873"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}