{"id":946292,"date":"2024-12-26T23:39:28","date_gmt":"2024-12-26T15:39:28","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/946292.html"},"modified":"2024-12-26T23:39:30","modified_gmt":"2024-12-26T15:39:30","slug":"python%e5%a6%82%e4%bd%95%e6%9f%a5%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/946292.html","title":{"rendered":"python\u5982\u4f55\u67e5\u65b9\u6cd5"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25082523\/bba00284-9cd2-4c22-a5e2-9b58f825c636.webp\" alt=\"python\u5982\u4f55\u67e5\u65b9\u6cd5\" \/><\/p>\n<p><p> <strong>Python\u4e2d\u67e5\u627e\u65b9\u6cd5\u7684\u65b9\u6cd5\u4e3b\u8981\u5305\u62ec\uff1a\u4f7f\u7528dir()\u51fd\u6570\u67e5\u770b\u5bf9\u8c61\u7684\u6240\u6709\u5c5e\u6027\u548c\u65b9\u6cd5\u3001\u4f7f\u7528help()\u51fd\u6570\u67e5\u770b\u65b9\u6cd5\u7684\u6587\u6863\u5b57\u7b26\u4e32\u3001\u4f7f\u7528inspect\u6a21\u5757\u83b7\u53d6\u66f4\u8be6\u7ec6\u7684\u4fe1\u606f\u3001\u67e5\u770b\u5728\u7ebf\u6587\u6863\u6216\u4f7f\u7528IDE\u7684\u81ea\u52a8\u8865\u5168\u529f\u80fd\u3002<\/strong> \u5728\u8fd9\u4e9b\u65b9\u6cd5\u4e2d\uff0c\u4f7f\u7528<code>dir()<\/code>\u51fd\u6570\u548c<code>help()<\/code>\u51fd\u6570\u662f\u6700\u4e3a\u76f4\u63a5\u548c\u5e38\u7528\u7684\u3002<code>dir()<\/code>\u51fd\u6570\u53ef\u4ee5\u5217\u51fa\u5bf9\u8c61\u7684\u6240\u6709\u5c5e\u6027\u548c\u65b9\u6cd5\uff0c\u800c<code>help()<\/code>\u51fd\u6570\u5219\u53ef\u4ee5\u63d0\u4f9b\u65b9\u6cd5\u7684\u8be6\u7ec6\u6587\u6863\u8bf4\u660e\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u8fd9\u4e9b\u65b9\u6cd5\u53ca\u5176\u4f7f\u7528\u573a\u666f\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u4f7f\u7528dir()\u51fd\u6570<\/p>\n<\/p>\n<p><p><code>dir()<\/code>\u51fd\u6570\u662fPython\u5185\u7f6e\u7684\u4e00\u4e2a\u975e\u5e38\u6709\u7528\u7684\u51fd\u6570\uff0c\u53ef\u4ee5\u7528\u4e8e\u8fd4\u56de\u4e00\u4e2a\u5bf9\u8c61\u7684\u5c5e\u6027\u548c\u65b9\u6cd5\u5217\u8868\u3002\u5b83\u975e\u5e38\u9002\u5408\u7528\u4e8e\u5feb\u901f\u67e5\u770b\u4e00\u4e2a\u5bf9\u8c61\uff08\u4f8b\u5982\u6a21\u5757\u3001\u7c7b\u3001\u5b9e\u4f8b\u7b49\uff09\u62e5\u6709\u7684\u6240\u6709\u5c5e\u6027\u548c\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u67e5\u770b\u6a21\u5757\u7684\u5c5e\u6027\u548c\u65b9\u6cd5<\/strong><\/p>\n<\/p>\n<p><p>\u5f53\u6211\u4eec\u5bfc\u5165\u4e00\u4e2a\u6a21\u5757\u65f6\uff0c\u53ef\u4ee5\u4f7f\u7528<code>dir()<\/code>\u51fd\u6570\u67e5\u770b\u8be5\u6a21\u5757\u63d0\u4f9b\u7684\u6240\u6709\u53ef\u7528\u5c5e\u6027\u548c\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import math<\/p>\n<p>print(dir(math))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4ee5\u4e0a\u4ee3\u7801\u5c06\u8f93\u51famath\u6a21\u5757\u7684\u6240\u6709\u5c5e\u6027\u548c\u65b9\u6cd5\uff0c\u6bd4\u5982<code>sin<\/code>\u3001<code>cos<\/code>\u3001<code>tan<\/code>\u7b49\u4e09\u89d2\u51fd\u6570\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u67e5\u770b\u7c7b\u548c\u5b9e\u4f8b\u7684\u5c5e\u6027\u548c\u65b9\u6cd5<\/strong><\/p>\n<\/p>\n<p><p>\u6211\u4eec\u8fd8\u53ef\u4ee5\u4f7f\u7528<code>dir()<\/code>\u51fd\u6570\u67e5\u770b\u7c7b\u548c\u5b9e\u4f8b\u7684\u6240\u6709\u5c5e\u6027\u548c\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">class MyClass:<\/p>\n<p>    def my_method(self):<\/p>\n<p>        pass<\/p>\n<p>obj = MyClass()<\/p>\n<p>print(dir(obj))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u5c06\u8f93\u51faMyClass\u7c7b\u5b9e\u4f8b<code>obj<\/code>\u7684\u6240\u6709\u5c5e\u6027\u548c\u65b9\u6cd5\uff0c\u5305\u62ecPython\u9ed8\u8ba4\u63d0\u4f9b\u7684\u7279\u6b8a\u65b9\u6cd5\uff08\u5982<code>__init__<\/code>\u3001<code>__str__<\/code>\u7b49\uff09\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e8c\u3001\u4f7f\u7528help()\u51fd\u6570<\/p>\n<\/p>\n<p><p><code>help()<\/code>\u51fd\u6570\u662fPython\u53e6\u4e00\u4e2a\u5185\u7f6e\u51fd\u6570\uff0c\u5b83\u7528\u4e8e\u67e5\u770b\u6a21\u5757\u3001\u7c7b\u3001\u51fd\u6570\u7b49\u5bf9\u8c61\u7684\u6587\u6863\u5b57\u7b26\u4e32\u3002<code>help()<\/code>\u51fd\u6570\u4e0d\u4ec5\u53ef\u4ee5\u663e\u793a\u51fa\u51fd\u6570\u7684\u7b7e\u540d\u4fe1\u606f\uff0c\u8fd8\u53ef\u4ee5\u8f93\u51fa\u51fd\u6570\u3001\u7c7b\u6216\u6a21\u5757\u7684\u8be6\u7ec6\u6587\u6863\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u67e5\u770b\u51fd\u6570\u7684\u6587\u6863<\/strong><\/p>\n<\/p>\n<p><p>\u4f7f\u7528<code>help()<\/code>\u51fd\u6570\u53ef\u4ee5\u67e5\u770b\u5177\u4f53\u51fd\u6570\u7684\u8be6\u7ec6\u4f7f\u7528\u8bf4\u660e\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">help(math.sin)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4ee5\u4e0a\u4ee3\u7801\u5c06\u8f93\u51fasin\u51fd\u6570\u7684\u6587\u6863\u8bf4\u660e\uff0c\u5305\u62ec\u53c2\u6570\u8bf4\u660e\u3001\u8fd4\u56de\u503c\u4ee5\u53ca\u51fd\u6570\u7684\u63cf\u8ff0\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u67e5\u770b\u7c7b\u7684\u6587\u6863<\/strong><\/p>\n<\/p>\n<p><p>\u540c\u6837\uff0c<code>help()<\/code>\u51fd\u6570\u53ef\u4ee5\u7528\u4e8e\u67e5\u770b\u7c7b\u7684\u6587\u6863\u8bf4\u660e\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">help(MyClass)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u5c06\u663e\u793aMyClass\u7c7b\u7684\u6587\u6863\uff0c\u5305\u62ec\u7c7b\u7684\u5c5e\u6027\u3001\u65b9\u6cd5\u4ee5\u53ca\u7c7b\u7684\u63cf\u8ff0\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e09\u3001\u4f7f\u7528inspect\u6a21\u5757<\/p>\n<\/p>\n<p><p><code>inspect<\/code>\u6a21\u5757\u63d0\u4f9b\u4e86\u591a\u79cd\u7528\u4e8e\u83b7\u53d6\u5b9e\u65f6\u5bf9\u8c61\u4fe1\u606f\u7684\u5de5\u5177\u3002\u901a\u8fc7<code>inspect<\/code>\u6a21\u5757\uff0c\u6211\u4eec\u53ef\u4ee5\u83b7\u53d6\u51fd\u6570\u7684\u53c2\u6570\u4fe1\u606f\u3001\u6e90\u4ee3\u7801\u3001\u7c7b\u7ee7\u627f\u5173\u7cfb\u7b49\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u83b7\u53d6\u51fd\u6570\u7b7e\u540d<\/strong><\/p>\n<\/p>\n<p><p>\u4f7f\u7528<code>inspect.signature()<\/code>\u53ef\u4ee5\u83b7\u53d6\u51fd\u6570\u7684\u7b7e\u540d\u4fe1\u606f\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import inspect<\/p>\n<p>def my_function(a, b):<\/p>\n<p>    return a + b<\/p>\n<p>sig = inspect.signature(my_function)<\/p>\n<p>print(sig)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u5c06\u8f93\u51fa\u51fd\u6570<code>my_function<\/code>\u7684\u7b7e\u540d\u4fe1\u606f\uff1a<code>(a, b)<\/code>\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u67e5\u770b\u7c7b\u7684\u7ee7\u627f\u5173\u7cfb<\/strong><\/p>\n<\/p>\n<p><p>\u4f7f\u7528<code>inspect.getmro()<\/code>\u53ef\u4ee5\u67e5\u770b\u7c7b\u7684\u7ee7\u627f\u5173\u7cfb\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">class Base:<\/p>\n<p>    pass<\/p>\n<p>class Derived(Base):<\/p>\n<p>    pass<\/p>\n<p>mro = inspect.getmro(Derived)<\/p>\n<p>print(mro)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8f93\u51fa\u5c06\u663e\u793a<code>Derived<\/code>\u7c7b\u7684\u7ee7\u627f\u5173\u7cfb\uff1a<code>(&lt;class &#39;__m<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>n__.Derived&#39;&gt;, &lt;class &#39;__main__.Base&#39;&gt;, &lt;class &#39;object&#39;&gt;)<\/code>\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u56db\u3001\u67e5\u770b\u5728\u7ebf\u6587\u6863\u548c\u4f7f\u7528IDE\u7684\u81ea\u52a8\u8865\u5168\u529f\u80fd<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u67e5\u770b\u5728\u7ebf\u6587\u6863<\/strong><\/p>\n<\/p>\n<p><p>\u5927\u591a\u6570Python\u5e93\u548c\u6a21\u5757\u90fd\u6709\u8be6\u7ec6\u7684\u5728\u7ebf\u6587\u6863\u3002\u8bbf\u95ee\u5e93\u7684\u5b98\u65b9\u7f51\u7ad9\u6216\u6587\u6863\u7ad9\u70b9\uff0c\u53ef\u4ee5\u67e5\u9605\u8be6\u7ec6\u7684API\u6587\u6863\u548c\u4f7f\u7528\u6307\u5357\u3002<\/p>\n<\/p>\n<p><p>\u4f8b\u5982\uff0cPython\u6807\u51c6\u5e93\u7684\u5728\u7ebf\u6587\u6863\u53ef\u4ee5\u5728<a href=\"https:\/\/docs.python.org\/%E4%B8%8A%E6%9F%A5%E9%98%85%E3%80%82\">https:\/\/docs.python.org\/\u4e0a\u67e5\u9605\u3002<\/a><\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4f7f\u7528IDE\u7684\u81ea\u52a8\u8865\u5168\u529f\u80fd<\/strong><\/p>\n<\/p>\n<p><p>\u73b0\u4ee3\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u901a\u5e38\u63d0\u4f9b\u4ee3\u7801\u81ea\u52a8\u8865\u5168\u548c\u6587\u6863\u67e5\u770b\u529f\u80fd\u3002\u4f8b\u5982\uff0cPyCharm\u3001Visual Studio Code\u7b49IDE\u53ef\u4ee5\u5728\u8f93\u5165\u4ee3\u7801\u65f6\u81ea\u52a8\u8865\u5168\u65b9\u6cd5\u540d\uff0c\u5e76\u663e\u793a\u65b9\u6cd5\u7684\u6587\u6863\u5b57\u7b26\u4e32\u3002<\/p>\n<\/p>\n<p><p>\u8fd9\u79cd\u65b9\u5f0f\u975e\u5e38\u9ad8\u6548\uff0c\u7279\u522b\u9002\u5408\u5e0c\u671b\u5feb\u901f\u67e5\u627e\u548c\u4f7f\u7528\u65b9\u6cd5\u7684\u5f00\u53d1\u8005\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e94\u3001\u7efc\u5408\u8fd0\u7528\u5404\u79cd\u65b9\u6cd5<\/p>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u5f00\u53d1\u4e2d\uff0c\u67e5\u627e\u65b9\u6cd5\u548c\u7406\u89e3\u5176\u4f7f\u7528\u65b9\u5f0f\u901a\u5e38\u9700\u8981\u7efc\u5408\u8fd0\u7528\u4e0a\u8ff0\u591a\u79cd\u65b9\u6cd5\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5b9e\u9645\u5e94\u7528\u573a\u666f\u548c\u5efa\u8bae\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u4e86\u89e3\u65b0\u6a21\u5757\u6216\u5e93<\/strong><\/p>\n<\/p>\n<p><p>\u5f53\u7b2c\u4e00\u6b21\u4f7f\u7528\u4e00\u4e2a\u65b0\u7684\u6a21\u5757\u6216\u5e93\u65f6\uff0c\u53ef\u4ee5\u901a\u8fc7<code>dir()<\/code>\u51fd\u6570\u5feb\u901f\u67e5\u770b\u5176\u63d0\u4f9b\u7684\u529f\u80fd\u3002\u7136\u540e\uff0c\u4f7f\u7528<code>help()<\/code>\u51fd\u6570\u67e5\u9605\u5177\u4f53\u65b9\u6cd5\u7684\u6587\u6863\u8bf4\u660e\uff0c\u4ee5\u4fbf\u66f4\u6df1\u5165\u5730\u7406\u89e3\u5176\u7528\u6cd5\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u8c03\u8bd5\u548c\u5206\u6790\u4ee3\u7801<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u8c03\u8bd5\u548c\u5206\u6790\u73b0\u6709\u4ee3\u7801\u65f6\uff0c\u4f7f\u7528<code>inspect<\/code>\u6a21\u5757\u53ef\u4ee5\u5e2e\u52a9\u4f60\u4e86\u89e3\u51fd\u6570\u548c\u7c7b\u7684\u5185\u90e8\u5b9e\u73b0\u7ec6\u8282\uff0c\u5305\u62ec\u51fd\u6570\u53c2\u6570\u3001\u7c7b\u7ee7\u627f\u5173\u7cfb\u7b49\u3002\u8fd9\u5bf9\u4e8e\u7406\u89e3\u590d\u6742\u4ee3\u7801\u548c\u8fdb\u884c\u4ee3\u7801\u91cd\u6784\u5f88\u6709\u5e2e\u52a9\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u63d0\u9ad8\u5f00\u53d1\u6548\u7387<\/strong><\/p>\n<\/p>\n<p><p>\u4f7f\u7528IDE\u7684\u81ea\u52a8\u8865\u5168\u529f\u80fd\u53ef\u4ee5\u663e\u8457\u63d0\u9ad8\u5f00\u53d1\u6548\u7387\u3002\u901a\u8fc7\u81ea\u52a8\u8865\u5168\u529f\u80fd\uff0c\u4f60\u53ef\u4ee5\u5feb\u901f\u67e5\u627e\u548c\u4f7f\u7528\u65b9\u6cd5\uff0c\u800c\u65e0\u9700\u624b\u52a8\u67e5\u9605\u6587\u6863\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5b66\u4e60\u548c\u501f\u9274<\/strong><\/p>\n<\/p>\n<p><p>\u67e5\u770b\u5728\u7ebf\u6587\u6863\u548c\u793e\u533a\u8d44\u6e90\u53ef\u4ee5\u5e2e\u52a9\u4f60\u4e86\u89e3\u6700\u4f73\u5b9e\u8df5\u548c\u5e38\u89c1\u4f7f\u7528\u6a21\u5f0f\u3002\u8bb8\u591a\u5f00\u6e90\u5e93\u548c\u6846\u67b6\u90fd\u6709\u6d3b\u8dc3\u7684\u793e\u533a\u548c\u4e30\u5bcc\u7684\u5b66\u4e60\u8d44\u6e90\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u901a\u8fc7\u638c\u63e1\u548c\u7075\u6d3b\u8fd0\u7528\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u4f60\u5c06\u80fd\u591f\u66f4\u52a0\u9ad8\u6548\u5730\u67e5\u627e\u548c\u4f7f\u7528Python\u4e2d\u7684\u65b9\u6cd5\uff0c\u4ece\u800c\u63d0\u5347\u5f00\u53d1\u6548\u7387\u548c\u4ee3\u7801\u8d28\u91cf\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u67e5\u627e\u7279\u5b9a\u5bf9\u8c61\u7684\u65b9\u6cd5\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u5185\u7f6e\u7684<code>dir()<\/code>\u51fd\u6570\u6765\u67e5\u770b\u4e00\u4e2a\u5bf9\u8c61\u7684\u6240\u6709\u5c5e\u6027\u548c\u65b9\u6cd5\u3002\u53ea\u9700\u5c06\u5bf9\u8c61\u4f5c\u4e3a\u53c2\u6570\u4f20\u9012\u7ed9<code>dir()<\/code>\uff0c\u5b83\u5c06\u8fd4\u56de\u4e00\u4e2a\u5b57\u7b26\u4e32\u5217\u8868\uff0c\u663e\u793a\u8be5\u5bf9\u8c61\u7684\u6240\u6709\u53ef\u7528\u65b9\u6cd5\u548c\u5c5e\u6027\u3002\u6b64\u5916\uff0c\u7ed3\u5408\u4f7f\u7528<code>help()<\/code>\u51fd\u6570\uff0c\u53ef\u4ee5\u83b7\u53d6\u6bcf\u4e2a\u65b9\u6cd5\u7684\u8be6\u7ec6\u8bf4\u660e\u548c\u7528\u6cd5\u793a\u4f8b\u3002<\/p>\n<p><strong>\u6709\u6ca1\u6709\u63a8\u8350\u7684\u5de5\u5177\u6216\u5e93\u6765\u67e5\u627ePython\u65b9\u6cd5\uff1f<\/strong><br \/>\u786e\u5b9e\u5b58\u5728\u4e00\u4e9b\u975e\u5e38\u6709\u7528\u7684\u5de5\u5177\u548c\u5e93\uff0c\u4f8b\u5982Jupyter Notebook\uff0c\u5b83\u63d0\u4f9b\u4e86\u4e00\u4e2a\u4ea4\u4e92\u5f0f\u73af\u5883\uff0c\u5141\u8bb8\u5f00\u53d1\u8005\u5728\u4ee3\u7801\u65c1\u8fb9\u4f7f\u7528<code>?<\/code>\u6216<code>help()<\/code>\u6765\u5feb\u901f\u67e5\u770b\u65b9\u6cd5\u7684\u8be6\u7ec6\u4fe1\u606f\u3002\u6b64\u5916\uff0cPython\u7684\u6807\u51c6\u5e93\u6587\u6863\u548c\u5728\u7ebf\u5e73\u53f0\u5982Read the Docs\u4e5f\u662f\u67e5\u627e\u65b9\u6cd5\u548c\u7c7b\u7684\u826f\u597d\u8d44\u6e90\u3002<\/p>\n<p><strong>\u5982\u4f55\u67e5\u627ePython\u6a21\u5757\u4e2d\u53ef\u7528\u7684\u65b9\u6cd5\u548c\u51fd\u6570\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>import<\/code>\u8bed\u53e5\u5f15\u5165\u6a21\u5757\u540e\uff0c\u5229\u7528<code>dir()<\/code>\u51fd\u6570\u67e5\u770b\u8be5\u6a21\u5757\u4e2d\u7684\u6240\u6709\u65b9\u6cd5\u548c\u5c5e\u6027\u3002\u5982\u679c\u60f3\u8981\u83b7\u53d6\u67d0\u4e2a\u7279\u5b9a\u65b9\u6cd5\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u53ef\u4ee5\u901a\u8fc7<code>help()<\/code>\u51fd\u6570\u67e5\u770b\u8be5\u65b9\u6cd5\u7684\u6587\u6863\uff0c\u6216\u8bbf\u95eePython\u7684\u5b98\u65b9\u7f51\u7ad9\uff0c\u67e5\u9605\u76f8\u5173\u6a21\u5757\u7684\u5b98\u65b9\u6587\u6863\u4ee5\u83b7\u53d6\u66f4\u5168\u9762\u7684\u6307\u5bfc\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u4e2d\u67e5\u627e\u65b9\u6cd5\u7684\u65b9\u6cd5\u4e3b\u8981\u5305\u62ec\uff1a\u4f7f\u7528dir()\u51fd\u6570\u67e5\u770b\u5bf9\u8c61\u7684\u6240\u6709\u5c5e\u6027\u548c\u65b9\u6cd5\u3001\u4f7f\u7528help()\u51fd\u6570\u67e5\u770b\u65b9\u6cd5 [&hellip;]","protected":false},"author":3,"featured_media":946295,"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\/946292"}],"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=946292"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/946292\/revisions"}],"predecessor-version":[{"id":946298,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/946292\/revisions\/946298"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/946295"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=946292"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=946292"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=946292"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}