{"id":1138751,"date":"2025-01-08T22:03:03","date_gmt":"2025-01-08T14:03:03","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1138751.html"},"modified":"2025-01-08T22:03:05","modified_gmt":"2025-01-08T14:03:05","slug":"python%e8%b0%83%e7%94%a8%e7%88%b6%e7%b1%bb%e7%9a%84%e5%87%bd%e6%95%b0%e5%90%8e%e5%a6%82%e4%bd%95%e8%be%93%e5%87%ba%e7%88%b6%e7%b1%bb-2","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1138751.html","title":{"rendered":"python\u8c03\u7528\u7236\u7c7b\u7684\u51fd\u6570\u540e\u5982\u4f55\u8f93\u51fa\u7236\u7c7b"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25102233\/2fff39be-d2fc-4dcc-a543-a21df7c9046f.webp\" alt=\"python\u8c03\u7528\u7236\u7c7b\u7684\u51fd\u6570\u540e\u5982\u4f55\u8f93\u51fa\u7236\u7c7b\" \/><\/p>\n<p><p> <strong>\u5728Python\u4e2d\u8c03\u7528\u7236\u7c7b\u7684\u51fd\u6570\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u8f93\u51fa\u7236\u7c7b\u76f8\u5173\u7684\u4fe1\u606f\u3002\u5177\u4f53\u65b9\u6cd5\u5305\u62ec\uff1a\u4f7f\u7528<code>super()<\/code>\u51fd\u6570\u3001\u76f4\u63a5\u8bbf\u95ee\u7236\u7c7b\u7684\u7c7b\u540d\u3001\u4ee5\u53ca\u5728\u5b50\u7c7b\u4e2d\u8c03\u7528\u7236\u7c7b\u7684\u65b9\u6cd5\u7b49\u3002\u6700\u5e38\u89c1\u7684\u65b9\u5f0f\u662f\u4f7f\u7528<code>super()<\/code>\u51fd\u6570<\/strong>\u3002<code>super()<\/code>\u51fd\u6570\u7528\u4e8e\u8c03\u7528\u7236\u7c7b\u7684\u4e00\u4e2a\u65b9\u6cd5\uff0c\u5e76\u4e14\u53ef\u4ee5\u540c\u65f6\u786e\u4fdd\u5728\u591a\u91cd\u7ee7\u627f\u7684\u60c5\u51b5\u4e0b\u6b63\u786e\u8c03\u7528\u3002\u63a5\u4e0b\u6765\u6211\u4eec\u8be6\u7ec6\u63cf\u8ff0\u5176\u4e2d\u7684\u4e00\u79cd\u65b9\u6cd5\uff0c\u5373\u4f7f\u7528<code>super()<\/code>\u51fd\u6570\u3002<\/p>\n<\/p>\n<p><p><strong>\u4f7f\u7528<code>super()<\/code>\u51fd\u6570<\/strong>\uff1a\u8fd9\u662fPython\u4e2d\u4e00\u79cd\u4f18\u96c5\u548c\u63a8\u8350\u7684\u65b9\u5f0f\u6765\u8c03\u7528\u7236\u7c7b\u7684\u65b9\u6cd5\u3002\u901a\u8fc7\u4f7f\u7528<code>super()<\/code>\uff0c\u4f60\u4e0d\u4ec5\u53ef\u4ee5\u8c03\u7528\u7236\u7c7b\u7684\u4e00\u4e2a\u65b9\u6cd5\uff0c\u8fd8\u53ef\u4ee5\u907f\u514d\u5728\u591a\u91cd\u7ee7\u627f\u7684\u60c5\u51b5\u4e0b\u53ef\u80fd\u51fa\u73b0\u7684\u95ee\u9898\u3002<code>super()<\/code>\u51fd\u6570\u4f1a\u81ea\u52a8\u67e5\u627e\u7236\u7c7b\u5e76\u8c03\u7528\u5176\u65b9\u6cd5\uff0c\u8fd9\u4f7f\u5f97\u4ee3\u7801\u66f4\u52a0\u7b80\u6d01\u548c\u6613\u4e8e\u7ef4\u62a4\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528<code>super()<\/code>\u51fd\u6570<\/h3>\n<\/p>\n<p><p>\u5f53\u9700\u8981\u5728\u5b50\u7c7b\u4e2d\u8c03\u7528\u7236\u7c7b\u7684\u65b9\u6cd5\u65f6\uff0c<code>super()<\/code>\u51fd\u6570\u662f\u6700\u65b9\u4fbf\u548c\u5e38\u7528\u7684\u65b9\u6cd5\u4e4b\u4e00\u3002\u5b83\u4e0d\u4ec5\u53ef\u4ee5\u51cf\u5c11\u4ee3\u7801\u91cd\u590d\uff0c\u8fd8\u80fd\u907f\u514d\u591a\u91cd\u7ee7\u627f\u5e26\u6765\u7684\u590d\u6742\u95ee\u9898\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u57fa\u672c\u7528\u6cd5<\/h4>\n<\/p>\n<p><p>\u5047\u8bbe\u6211\u4eec\u6709\u4e00\u4e2a\u7b80\u5355\u7684\u7c7b\u7ed3\u6784\uff0c\u5176\u4e2d<code>Child<\/code>\u7c7b\u7ee7\u627f\u81ea<code>Parent<\/code>\u7c7b\u3002\u6211\u4eec\u53ef\u4ee5\u5728<code>Child<\/code>\u7c7b\u4e2d\u8c03\u7528<code>Parent<\/code>\u7c7b\u7684\u65b9\u6cd5\uff0c\u5e76\u4e14\u5728\u8c03\u7528\u540e\u8f93\u51fa\u7236\u7c7b\u7684\u4fe1\u606f\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">class Parent:<\/p>\n<p>    def display(self):<\/p>\n<p>        print(&quot;This is the Parent class.&quot;)<\/p>\n<p>class Child(Parent):<\/p>\n<p>    def display(self):<\/p>\n<p>        super().display()<\/p>\n<p>        print(&quot;This is the Child class.&quot;)<\/p>\n<p>        print(f&quot;Parent class: {super().__class__.__bases__[0].__name__}&quot;)<\/p>\n<p>child = Child()<\/p>\n<p>child.display()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c<code>Child<\/code>\u7c7b\u7684<code>display<\/code>\u65b9\u6cd5\u9996\u5148\u8c03\u7528\u4e86\u7236\u7c7b<code>Parent<\/code>\u7684<code>display<\/code>\u65b9\u6cd5\uff0c\u7136\u540e\u8f93\u51fa\u4e86\u4e00\u4e9b\u989d\u5916\u7684\u4fe1\u606f\uff0c\u5305\u62ec\u7236\u7c7b\u7684\u540d\u79f0\u3002<\/p>\n<\/p>\n<p><h4>2\u3001\u590d\u6742\u7528\u6cd5<\/h4>\n<\/p>\n<p><p>\u5728\u66f4\u590d\u6742\u7684\u7c7b\u7ed3\u6784\u4e2d\uff0c<code>super()<\/code>\u51fd\u6570\u4f9d\u7136\u80fd\u53d1\u6325\u5176\u4f5c\u7528\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u5177\u6709\u591a\u4e2a\u7ee7\u627f\u5c42\u6b21\u7684\u4f8b\u5b50\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">class Grandparent:<\/p>\n<p>    def display(self):<\/p>\n<p>        print(&quot;This is the Grandparent class.&quot;)<\/p>\n<p>class Parent(Grandparent):<\/p>\n<p>    def display(self):<\/p>\n<p>        super().display()<\/p>\n<p>        print(&quot;This is the Parent class.&quot;)<\/p>\n<p>class Child(Parent):<\/p>\n<p>    def display(self):<\/p>\n<p>        super().display()<\/p>\n<p>        print(&quot;This is the Child class.&quot;)<\/p>\n<p>        print(f&quot;Parent class: {super().__class__.__bases__[0].__name__}&quot;)<\/p>\n<p>child = Child()<\/p>\n<p>child.display()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u4e2a\u4f8b\u5b50\u5c55\u793a\u4e86\u5982\u4f55\u5728\u591a\u91cd\u7ee7\u627f\u7684\u60c5\u51b5\u4e0b\u4f7f\u7528<code>super()<\/code>\u51fd\u6570\u3002<code>Child<\/code>\u7c7b\u4e2d\u7684<code>display<\/code>\u65b9\u6cd5\u8c03\u7528\u4e86<code>Parent<\/code>\u7c7b\u7684<code>display<\/code>\u65b9\u6cd5\uff0c\u800c<code>Parent<\/code>\u7c7b\u7684<code>display<\/code>\u65b9\u6cd5\u53c8\u8c03\u7528\u4e86<code>Grandparent<\/code>\u7c7b\u7684<code>display<\/code>\u65b9\u6cd5\u3002\u8fd9\u79cd\u65b9\u5f0f\u786e\u4fdd\u4e86\u6bcf\u4e2a\u7c7b\u7684<code>display<\/code>\u65b9\u6cd5\u90fd\u80fd\u88ab\u6b63\u786e\u8c03\u7528\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u76f4\u63a5\u8bbf\u95ee\u7236\u7c7b\u7684\u7c7b\u540d<\/h3>\n<\/p>\n<p><p>\u9664\u4e86\u4f7f\u7528<code>super()<\/code>\u51fd\u6570\uff0c\u8fd8\u53ef\u4ee5\u901a\u8fc7\u76f4\u63a5\u8bbf\u95ee\u7236\u7c7b\u7684\u7c7b\u540d\u6765\u8c03\u7528\u7236\u7c7b\u7684\u65b9\u6cd5\u3002\u8fd9\u79cd\u65b9\u5f0f\u867d\u7136\u4e0d\u5982<code>super()<\/code>\u51fd\u6570\u4f18\u96c5\uff0c\u4f46\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\u53ef\u80fd\u66f4\u4e3a\u76f4\u89c2\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u57fa\u672c\u7528\u6cd5<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">class Parent:<\/p>\n<p>    def display(self):<\/p>\n<p>        print(&quot;This is the Parent class.&quot;)<\/p>\n<p>class Child(Parent):<\/p>\n<p>    def display(self):<\/p>\n<p>        Parent.display(self)<\/p>\n<p>        print(&quot;This is the Child class.&quot;)<\/p>\n<p>        print(f&quot;Parent class: {Parent.__name__}&quot;)<\/p>\n<p>child = Child()<\/p>\n<p>child.display()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u6211\u4eec\u76f4\u63a5\u4f7f\u7528<code>Parent.display(self)<\/code>\u6765\u8c03\u7528\u7236\u7c7b\u7684<code>display<\/code>\u65b9\u6cd5\uff0c\u5e76\u8f93\u51fa\u7236\u7c7b\u7684\u540d\u79f0\u3002<\/p>\n<\/p>\n<p><h4>2\u3001\u590d\u6742\u7528\u6cd5<\/h4>\n<\/p>\n<p><p>\u5728\u591a\u91cd\u7ee7\u627f\u7684\u60c5\u51b5\u4e0b\uff0c\u8fd9\u79cd\u65b9\u6cd5\u663e\u5f97\u8f83\u4e3a\u7b28\u91cd\uff0c\u4f46\u4f9d\u7136\u53ef\u884c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">class Grandparent:<\/p>\n<p>    def display(self):<\/p>\n<p>        print(&quot;This is the Grandparent class.&quot;)<\/p>\n<p>class Parent(Grandparent):<\/p>\n<p>    def display(self):<\/p>\n<p>        Grandparent.display(self)<\/p>\n<p>        print(&quot;This is the Parent class.&quot;)<\/p>\n<p>class Child(Parent):<\/p>\n<p>    def display(self):<\/p>\n<p>        Parent.display(self)<\/p>\n<p>        print(&quot;This is the Child class.&quot;)<\/p>\n<p>        print(f&quot;Parent class: {Parent.__name__}&quot;)<\/p>\n<p>child = Child()<\/p>\n<p>child.display()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u4e2a\u4f8b\u5b50\u5c55\u793a\u4e86\u5982\u4f55\u5728\u591a\u91cd\u7ee7\u627f\u7684\u60c5\u51b5\u4e0b\u76f4\u63a5\u8c03\u7528\u7236\u7c7b\u7684\u65b9\u6cd5\uff0c\u5e76\u8f93\u51fa\u7236\u7c7b\u7684\u540d\u79f0\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u5728\u5b50\u7c7b\u4e2d\u8c03\u7528\u7236\u7c7b\u7684\u65b9\u6cd5<\/h3>\n<\/p>\n<p><p>\u6709\u65f6\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u5728\u5b50\u7c7b\u4e2d\u8c03\u7528\u7236\u7c7b\u7684\u65b9\u6cd5\uff0c\u5e76\u5728\u65b9\u6cd5\u8c03\u7528\u540e\u8f93\u51fa\u4e00\u4e9b\u7279\u5b9a\u7684\u4fe1\u606f\u3002\u8fd9\u79cd\u65b9\u6cd5\u5bf9\u4e8e\u8c03\u8bd5\u548c\u65e5\u5fd7\u8bb0\u5f55\u975e\u5e38\u6709\u7528\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u57fa\u672c\u7528\u6cd5<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">class Parent:<\/p>\n<p>    def display(self):<\/p>\n<p>        print(&quot;This is the Parent class.&quot;)<\/p>\n<p>class Child(Parent):<\/p>\n<p>    def display(self):<\/p>\n<p>        Parent.display(self)<\/p>\n<p>        print(&quot;This is the Child class.&quot;)<\/p>\n<p>    def output_parent(self):<\/p>\n<p>        print(f&quot;The parent class is: {Parent.__name__}&quot;)<\/p>\n<p>child = Child()<\/p>\n<p>child.display()<\/p>\n<p>child.output_parent()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u6211\u4eec\u5728\u5b50\u7c7b<code>Child<\/code>\u4e2d\u5b9a\u4e49\u4e86\u4e00\u4e2a<code>output_parent<\/code>\u65b9\u6cd5\uff0c\u7528\u4e8e\u8f93\u51fa\u7236\u7c7b\u7684\u540d\u79f0\u3002<\/p>\n<\/p>\n<p><h4>2\u3001\u590d\u6742\u7528\u6cd5<\/h4>\n<\/p>\n<p><p>\u5728\u591a\u91cd\u7ee7\u627f\u7684\u60c5\u51b5\u4e0b\uff0c\u8fd9\u79cd\u65b9\u6cd5\u4f9d\u7136\u9002\u7528\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">class Grandparent:<\/p>\n<p>    def display(self):<\/p>\n<p>        print(&quot;This is the Grandparent class.&quot;)<\/p>\n<p>class Parent(Grandparent):<\/p>\n<p>    def display(self):<\/p>\n<p>        Grandparent.display(self)<\/p>\n<p>        print(&quot;This is the Parent class.&quot;)<\/p>\n<p>class Child(Parent):<\/p>\n<p>    def display(self):<\/p>\n<p>        Parent.display(self)<\/p>\n<p>        print(&quot;This is the Child class.&quot;)<\/p>\n<p>    def output_parent(self):<\/p>\n<p>        print(f&quot;The parent class is: {Parent.__name__}&quot;)<\/p>\n<p>child = Child()<\/p>\n<p>child.display()<\/p>\n<p>child.output_parent()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u4e2a\u4f8b\u5b50\u5c55\u793a\u4e86\u5982\u4f55\u5728\u591a\u91cd\u7ee7\u627f\u7684\u60c5\u51b5\u4e0b\u8c03\u7528\u7236\u7c7b\u7684\u65b9\u6cd5\uff0c\u5e76\u5728\u5b50\u7c7b\u4e2d\u8f93\u51fa\u7236\u7c7b\u7684\u540d\u79f0\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u5728Python\u4e2d\uff0c\u8c03\u7528\u7236\u7c7b\u7684\u65b9\u6cd5\u540e\u8f93\u51fa\u7236\u7c7b\u7684\u4fe1\u606f\u6709\u591a\u79cd\u65b9\u6cd5\uff0c\u6700\u5e38\u89c1\u548c\u63a8\u8350\u7684\u65b9\u6cd5\u662f\u4f7f\u7528<code>super()<\/code>\u51fd\u6570\u3002<code>super()<\/code>\u51fd\u6570\u4e0d\u4ec5\u7b80\u6d01\u4f18\u96c5\uff0c\u800c\u4e14\u80fd\u6709\u6548\u5904\u7406\u591a\u91cd\u7ee7\u627f\u5e26\u6765\u7684\u590d\u6742\u95ee\u9898\u3002\u6b64\u5916\uff0c\u8fd8\u53ef\u4ee5\u901a\u8fc7\u76f4\u63a5\u8bbf\u95ee\u7236\u7c7b\u7684\u7c7b\u540d\u6216\u5728\u5b50\u7c7b\u4e2d\u5b9a\u4e49\u7279\u5b9a\u7684\u65b9\u6cd5\u6765\u5b9e\u73b0\u8fd9\u4e00\u9700\u6c42\u3002\u65e0\u8bba\u54ea\u79cd\u65b9\u6cd5\uff0c\u90fd\u5e94\u6839\u636e\u5177\u4f53\u60c5\u51b5\u9009\u62e9\u6700\u5408\u9002\u7684\u4e00\u79cd\uff0c\u4ee5\u786e\u4fdd\u4ee3\u7801\u7684\u53ef\u8bfb\u6027\u548c\u7ef4\u62a4\u6027\u3002<\/p>\n<\/p>\n<p><p>\u901a\u8fc7\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u4f60\u53ef\u4ee5\u66f4\u7075\u6d3b\u5730\u64cd\u4f5c\u7c7b\u548c\u5bf9\u8c61\uff0c\u5145\u5206\u5229\u7528\u9762\u5411\u5bf9\u8c61\u7f16\u7a0b\u7684\u5f3a\u5927\u529f\u80fd\u3002\u65e0\u8bba\u662f\u7b80\u5355\u7684\u5355\u7ee7\u627f\u7ed3\u6784\uff0c\u8fd8\u662f\u590d\u6742\u7684\u591a\u91cd\u7ee7\u627f\u7ed3\u6784\uff0c\u8fd9\u4e9b\u65b9\u6cd5\u90fd\u80fd\u5e2e\u52a9\u4f60\u5b9e\u73b0\u5bf9\u7236\u7c7b\u65b9\u6cd5\u7684\u8c03\u7528\u548c\u4fe1\u606f\u8f93\u51fa\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u8c03\u7528\u7236\u7c7b\u7684\u51fd\u6570\u5e76\u6b63\u786e\u8f93\u51fa\u7ed3\u679c\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528<code>super()<\/code>\u51fd\u6570\u6765\u8c03\u7528\u7236\u7c7b\u7684\u65b9\u6cd5\u3002\u5f53\u4f60\u5728\u5b50\u7c7b\u4e2d\u9700\u8981\u8bbf\u95ee\u7236\u7c7b\u7684\u67d0\u4e2a\u65b9\u6cd5\u65f6\uff0c\u53ef\u4ee5\u76f4\u63a5\u901a\u8fc7<code>super().method_name()<\/code>\u6765\u5b9e\u73b0\u3002\u8fd9\u79cd\u65b9\u5f0f\u4e0d\u4ec5\u80fd\u786e\u4fdd\u8c03\u7528\u7684\u662f\u7236\u7c7b\u7684\u65b9\u6cd5\uff0c\u8fd8\u80fd\u5904\u7406\u591a\u91cd\u7ee7\u627f\u65f6\u7684\u590d\u6742\u60c5\u51b5\u3002<\/p>\n<p><strong>\u5728\u8c03\u7528\u7236\u7c7b\u51fd\u6570\u540e\uff0c\u5982\u4f55\u786e\u4fdd\u8f93\u51fa\u7684\u662f\u7236\u7c7b\u7684\u5c5e\u6027\u6216\u65b9\u6cd5\uff1f<\/strong><br \/>\u5728\u8c03\u7528\u7236\u7c7b\u7684\u65b9\u6cd5\u540e\uff0c\u53ef\u4ee5\u76f4\u63a5\u8f93\u51fa\u7236\u7c7b\u7684\u5c5e\u6027\u6216\u65b9\u6cd5\u3002\u5982\u679c\u5728\u5b50\u7c7b\u4e2d\u91cd\u5199\u4e86\u8fd9\u4e9b\u5c5e\u6027\u6216\u65b9\u6cd5\uff0c\u786e\u4fdd\u5728\u8c03\u7528\u65f6\u4f7f\u7528<code>super()<\/code>\u6765\u8bbf\u95ee\u539f\u59cb\u7684\u7236\u7c7b\u5b9e\u73b0\u3002\u8fd9\u6837\uff0c\u4f60\u53ef\u4ee5\u907f\u514d\u5b50\u7c7b\u4e2d\u7684\u8986\u76d6\u95ee\u9898\uff0c\u786e\u4fdd\u8f93\u51fa\u7684\u662f\u7236\u7c7b\u7684\u5185\u5bb9\u3002<\/p>\n<p><strong>\u5982\u679c\u7236\u7c7b\u4e2d\u6709\u591a\u4e2a\u65b9\u6cd5\uff0c\u5982\u4f55\u9009\u62e9\u6027\u5730\u8c03\u7528\u67d0\u4e00\u4e2a\u65b9\u6cd5\uff1f<\/strong><br \/>\u5982\u679c\u7236\u7c7b\u5305\u542b\u591a\u4e2a\u65b9\u6cd5\uff0c\u53ef\u4ee5\u901a\u8fc7\u5177\u4f53\u6307\u5b9a\u65b9\u6cd5\u540d\u79f0\u6765\u8fdb\u884c\u8c03\u7528\u3002\u4f8b\u5982\uff0c\u4f7f\u7528<code>super().method_name()<\/code>\u6765\u8c03\u7528\u7279\u5b9a\u7684\u65b9\u6cd5\u3002\u5982\u679c\u9700\u8981\u5728\u5b50\u7c7b\u4e2d\u8c03\u7528\u6240\u6709\u7236\u7c7b\u7684\u65b9\u6cd5\uff0c\u53ef\u4ee5\u901a\u8fc7\u5217\u51fa\u8fd9\u4e9b\u65b9\u6cd5\u5e76\u9010\u4e00\u8c03\u7528\u6765\u5b9e\u73b0\uff0c\u786e\u4fdd\u4f7f\u7528<code>super()<\/code>\u6765\u4fdd\u7559\u7236\u7c7b\u7684\u903b\u8f91\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\u8c03\u7528\u7236\u7c7b\u7684\u51fd\u6570\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u8f93\u51fa\u7236\u7c7b\u76f8\u5173\u7684\u4fe1\u606f\u3002\u5177\u4f53\u65b9\u6cd5\u5305\u62ec\uff1a\u4f7f\u7528super()\u51fd\u6570\u3001\u76f4 [&hellip;]","protected":false},"author":3,"featured_media":1138754,"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\/1138751"}],"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=1138751"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1138751\/revisions"}],"predecessor-version":[{"id":1138755,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1138751\/revisions\/1138755"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1138754"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1138751"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1138751"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1138751"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}