{"id":1169693,"date":"2025-01-15T16:13:37","date_gmt":"2025-01-15T08:13:37","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1169693.html"},"modified":"2025-01-15T16:13:40","modified_gmt":"2025-01-15T08:13:40","slug":"%e5%a6%82%e4%bd%95%e6%9f%a5%e7%9c%8bpython%e6%a8%a1%e5%9d%97%e5%87%bd%e6%95%b0%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1169693.html","title":{"rendered":"\u5982\u4f55\u67e5\u770bpython\u6a21\u5757\u51fd\u6570\u65b9\u6cd5"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/26070554\/4c52191a-45c0-4412-b09c-268360c6387f.webp\" alt=\"\u5982\u4f55\u67e5\u770bpython\u6a21\u5757\u51fd\u6570\u65b9\u6cd5\" \/><\/p>\n<p><p> <strong>\u5982\u4f55\u67e5\u770bPython\u6a21\u5757\u51fd\u6570\u65b9\u6cd5\uff1a<\/strong><\/p>\n<\/p>\n<p><p><strong>\u901a\u8fc7\u6587\u6863\u5b57\u7b26\u4e32\u3001\u4f7f\u7528dir()\u51fd\u6570\u3001\u5229\u7528help()\u51fd\u6570\u3001\u67e5\u770b\u5b98\u65b9\u6587\u6863\u3001\u4f7f\u7528\u7b2c\u4e09\u65b9\u5de5\u5177<\/strong>\u53ef\u4ee5\u67e5\u770bPython\u6a21\u5757\u51fd\u6570\u65b9\u6cd5\u3002<strong>\u4f7f\u7528dir()\u51fd\u6570<\/strong>\u662f\u4e00\u4e2a\u4fbf\u6377\u7684\u65b9\u6cd5\uff0c\u5c24\u5176\u9002\u5408\u5feb\u901f\u67e5\u770b\u6a21\u5757\u4e2d\u7684\u6240\u6709\u5c5e\u6027\u548c\u65b9\u6cd5\u3002\u901a\u8fc7\u5728Python\u4ea4\u4e92\u5f0f\u89e3\u91ca\u5668\u4e2d\u8f93\u5165<code>dir(module_name)<\/code>\uff0c\u4f60\u53ef\u4ee5\u83b7\u53d6\u6a21\u5757\u4e2d\u7684\u6240\u6709\u5c5e\u6027\u548c\u65b9\u6cd5\u5217\u8868\u3002\u4e0b\u9762\u6211\u4eec\u8be6\u7ec6\u8bb2\u89e3\u5982\u4f55\u4f7f\u7528dir()\u51fd\u6570\u6765\u67e5\u770bPython\u6a21\u5757\u7684\u51fd\u6570\u548c\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><p><strong>\u4f7f\u7528dir()\u51fd\u6570\u6765\u67e5\u770bPython\u6a21\u5757\u7684\u51fd\u6570\u548c\u65b9\u6cd5\uff1a<\/strong><\/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\u5b83\u53ef\u4ee5\u8fd4\u56de\u4e00\u4e2a\u6a21\u5757\u3001\u7c7b\u3001\u5b9e\u4f8b\u7b49\u6240\u6709\u5c5e\u6027\u548c\u65b9\u6cd5\u7684\u5217\u8868\u3002\u901a\u8fc7\u4f7f\u7528 <code>dir()<\/code> \u51fd\u6570\uff0c\u6211\u4eec\u53ef\u4ee5\u8f7b\u677e\u67e5\u770b\u4e00\u4e2a\u6a21\u5757\u4e2d\u5305\u542b\u7684\u6240\u6709\u51fd\u6570\u548c\u65b9\u6cd5\u3002\u6bd4\u5982\uff0c\u6211\u4eec\u53ef\u4ee5\u8fd9\u6837\u6765\u67e5\u770b\u6807\u51c6\u5e93\u4e2d\u7684 <code>math<\/code> \u6a21\u5757\uff1a<\/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>\u8fd0\u884c\u8fd9\u6bb5\u4ee3\u7801\u540e\uff0c<code>dir()<\/code> \u51fd\u6570\u5c06\u8fd4\u56de\u4e00\u4e2a\u5305\u542b <code>math<\/code> \u6a21\u5757\u6240\u6709\u5c5e\u6027\u548c\u65b9\u6cd5\u7684\u5217\u8868\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u901a\u8fc7\u6587\u6863\u5b57\u7b26\u4e32<\/h3>\n<\/p>\n<p><p>Python\u4e2d\u7684\u6bcf\u4e2a\u6a21\u5757\u548c\u51fd\u6570\u90fd\u53ef\u4ee5\u5305\u542b\u4e00\u4e2a\u6587\u6863\u5b57\u7b26\u4e32\uff08docstring\uff09\uff0c\u8fd9\u662f\u4e00\u79cd\u5d4c\u5165\u5728\u4ee3\u7801\u4e2d\u7684\u6587\u6863\u3002\u6587\u6863\u5b57\u7b26\u4e32\u53ef\u4ee5\u901a\u8fc7 <code>__doc__<\/code> \u5c5e\u6027\u8bbf\u95ee\u3002<\/p>\n<\/p>\n<p><p>\u4f8b\u5982\uff0c\u67e5\u770b <code>math<\/code> \u6a21\u5757\u7684\u6587\u6863\u5b57\u7b26\u4e32\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import math<\/p>\n<p>print(math.__doc__)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u540c\u6837\u7684\uff0c\u67e5\u770b <code>math<\/code> \u6a21\u5757\u4e2d <code>sqrt<\/code> \u51fd\u6570\u7684\u6587\u6863\u5b57\u7b26\u4e32\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">print(math.sqrt.__doc__)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u53ef\u4ee5\u83b7\u53d6\u6a21\u5757\u548c\u51fd\u6570\u7684\u57fa\u672c\u4fe1\u606f\u548c\u4f7f\u7528\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528dir()\u51fd\u6570<\/h3>\n<\/p>\n<p><p><code>dir()<\/code> \u51fd\u6570\u53ef\u4ee5\u5217\u51fa\u4e00\u4e2a\u6a21\u5757\u6216\u5bf9\u8c61\u7684\u6240\u6709\u5c5e\u6027\u548c\u65b9\u6cd5\u3002\u5bf9\u4e8e\u6a21\u5757\u6765\u8bf4\uff0c\u5b83\u53ef\u4ee5\u5217\u51fa\u6a21\u5757\u4e2d\u5b9a\u4e49\u7684\u6240\u6709\u5185\u5bb9\u3002<\/p>\n<\/p>\n<p><p>\u4f8b\u5982\uff0c\u67e5\u770b <code>math<\/code> \u6a21\u5757\u4e2d\u7684\u6240\u6709\u5c5e\u6027\u548c\u65b9\u6cd5\uff1a<\/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>\u8f93\u51fa\u5c06\u5305\u542b <code>math<\/code> \u6a21\u5757\u4e2d\u7684\u6240\u6709\u51fd\u6570\u548c\u5e38\u91cf\uff0c\u5982 <code>sqrt<\/code>, <code>sin<\/code>, <code>pi<\/code> \u7b49\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u5229\u7528help()\u51fd\u6570<\/h3>\n<\/p>\n<p><p><code>help()<\/code> \u51fd\u6570\u53ef\u4ee5\u63d0\u4f9b\u6a21\u5757\u3001\u51fd\u6570\u3001\u7c7b\u7b49\u7684\u8be6\u7ec6\u5e2e\u52a9\u4fe1\u606f\uff0c\u5305\u62ec\u6587\u6863\u5b57\u7b26\u4e32\u548c\u5b9a\u4e49\u3002<\/p>\n<\/p>\n<p><p>\u4f8b\u5982\uff0c\u67e5\u770b <code>math<\/code> \u6a21\u5757\u7684\u5e2e\u52a9\u4fe1\u606f\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import math<\/p>\n<p>help(math)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u67e5\u770b <code>math<\/code> \u6a21\u5757\u4e2d <code>sqrt<\/code> \u51fd\u6570\u7684\u5e2e\u52a9\u4fe1\u606f\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">help(math.sqrt)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><code>help()<\/code> \u51fd\u6570\u4f1a\u8f93\u51fa\u8be6\u7ec6\u7684\u5e2e\u52a9\u4fe1\u606f\uff0c\u5305\u62ec\u51fd\u6570\u7684\u53c2\u6570\u548c\u7528\u9014\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u67e5\u770b\u5b98\u65b9\u6587\u6863<\/h3>\n<\/p>\n<p><p>Python\u5b98\u65b9\u6587\u6863\u662f\u4e86\u89e3\u6a21\u5757\u548c\u51fd\u6570\u7684\u6700\u4f73\u6765\u6e90\u3002\u5b98\u65b9\u6587\u6863\u63d0\u4f9b\u4e86\u8be6\u5c3d\u7684\u63cf\u8ff0\u3001\u793a\u4f8b\u548c\u4f7f\u7528\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><p>\u4f8b\u5982\uff0c\u67e5\u770b <code>math<\/code> \u6a21\u5757\u7684\u5b98\u65b9\u6587\u6863\uff0c\u53ef\u4ee5\u8bbf\u95ee\u4ee5\u4e0b\u94fe\u63a5\uff1a<\/p>\n<p><a href=\"https:\/\/docs.python.org\/3\/library\/math.html\">Python \u5b98\u65b9\u6587\u6863 &#8211; math \u6a21\u5757<\/a><\/p>\n<\/p>\n<p><p>\u5728\u5b98\u65b9\u6587\u6863\u4e2d\uff0c\u53ef\u4ee5\u67e5\u627e\u5230\u6bcf\u4e2a\u51fd\u6570\u7684\u8be6\u7ec6\u8bf4\u660e\u548c\u793a\u4f8b\u4ee3\u7801\u3002<\/p>\n<\/p>\n<p><h3>\u4e94\u3001\u4f7f\u7528\u7b2c\u4e09\u65b9\u5de5\u5177<\/h3>\n<\/p>\n<p><p>\u4e00\u4e9b\u7b2c\u4e09\u65b9\u5de5\u5177\u548cIDE\uff08\u5982PyCharm\u3001VS Code\uff09\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u4ee3\u7801\u8865\u5168\u548c\u6587\u6863\u67e5\u770b\u529f\u80fd\uff0c\u53ef\u4ee5\u5e2e\u52a9\u5f00\u53d1\u8005\u5feb\u901f\u67e5\u770b\u6a21\u5757\u548c\u51fd\u6570\u7684\u6587\u6863\u3002<\/p>\n<\/p>\n<p><p>\u4f8b\u5982\uff0c\u5728PyCharm\u4e2d\uff0c\u5c06\u5149\u6807\u653e\u5728\u51fd\u6570\u6216\u6a21\u5757\u540d\u79f0\u4e0a\uff0c\u7136\u540e\u6309 <code>Ctrl+Q<\/code>\uff08Windows\uff09\u6216 <code>Ctrl+J<\/code>\uff08Mac\uff09\uff0c\u53ef\u4ee5\u67e5\u770b\u8be6\u7ec6\u7684\u6587\u6863\u4fe1\u606f\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u901a\u8fc7\u6587\u6863\u5b57\u7b26\u4e32<\/h3>\n<\/p>\n<p><h4>1.1 \u6587\u6863\u5b57\u7b26\u4e32\u7684\u6982\u8ff0<\/h4>\n<\/p>\n<p><p>\u6587\u6863\u5b57\u7b26\u4e32\uff08Docstring\uff09\u662fPython\u4e2d\u7528\u4e8e\u7ed9\u6a21\u5757\u3001\u7c7b\u3001\u65b9\u6cd5\u548c\u51fd\u6570\u7f16\u5199\u6587\u6863\u7684\u4e00\u79cd\u5b57\u7b26\u4e32\u3002\u5b83\u901a\u5e38\u4f4d\u4e8e\u5b9a\u4e49\u7684\u7b2c\u4e00\u884c\uff0c\u7528\u4e09\u5f15\u53f7\u62ec\u8d77\u6765\u3002\u6587\u6863\u5b57\u7b26\u4e32\u53ef\u4ee5\u901a\u8fc7\u5bf9\u8c61\u7684 <code>__doc__<\/code> \u5c5e\u6027\u8bbf\u95ee\u3002\u5b83\u4e0d\u4ec5\u6709\u52a9\u4e8e\u4ee3\u7801\u7684\u53ef\u8bfb\u6027\uff0c\u8fd8\u53ef\u4ee5\u901a\u8fc7\u5de5\u5177\u81ea\u52a8\u751f\u6210\u6587\u6863\u3002<\/p>\n<\/p>\n<p><h4>1.2 \u83b7\u53d6\u6a21\u5757\u7684\u6587\u6863\u5b57\u7b26\u4e32<\/h4>\n<\/p>\n<p><p>\u4f8b\u5982\uff0c\u67e5\u770b\u6807\u51c6\u5e93 <code>math<\/code> \u6a21\u5757\u7684\u6587\u6863\u5b57\u7b26\u4e32\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import math<\/p>\n<p>print(math.__doc__)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8f93\u51fa\u5c06\u5305\u542b <code>math<\/code> \u6a21\u5757\u7684\u7b80\u4ecb\u548c\u51fd\u6570\u5217\u8868\u3002\u8fd9\u5bf9\u4e8e\u4e86\u89e3\u6a21\u5757\u7684\u6574\u4f53\u529f\u80fd\u975e\u5e38\u6709\u5e2e\u52a9\u3002<\/p>\n<\/p>\n<p><h4>1.3 \u83b7\u53d6\u51fd\u6570\u7684\u6587\u6863\u5b57\u7b26\u4e32<\/h4>\n<\/p>\n<p><p>\u4f8b\u5982\uff0c\u67e5\u770b <code>math<\/code> \u6a21\u5757\u4e2d <code>sqrt<\/code> \u51fd\u6570\u7684\u6587\u6863\u5b57\u7b26\u4e32\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">print(math.sqrt.__doc__)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8f93\u51fa\u5c06\u5305\u542b <code>sqrt<\/code> \u51fd\u6570\u7684\u8bf4\u660e\u548c\u53c2\u6570\u5217\u8868\uff0c\u5e2e\u52a9\u4e86\u89e3\u51fd\u6570\u7684\u5177\u4f53\u7528\u9014\u548c\u7528\u6cd5\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528dir()\u51fd\u6570<\/h3>\n<\/p>\n<p><h4>2.1 dir()\u51fd\u6570\u7684\u6982\u8ff0<\/h4>\n<\/p>\n<p><p><code>dir()<\/code> \u662fPython\u7684\u5185\u7f6e\u51fd\u6570\uff0c\u7528\u4e8e\u8fd4\u56de\u6a21\u5757\u3001\u7c7b\u3001\u5b9e\u4f8b\u7b49\u5bf9\u8c61\u7684\u6240\u6709\u5c5e\u6027\u548c\u65b9\u6cd5\u7684\u5217\u8868\u3002\u5bf9\u4e8e\u6a21\u5757\u6765\u8bf4\uff0c<code>dir()<\/code> \u51fd\u6570\u53ef\u4ee5\u5217\u51fa\u6a21\u5757\u4e2d\u5b9a\u4e49\u7684\u6240\u6709\u5185\u5bb9\uff0c\u5305\u62ec\u51fd\u6570\u3001\u53d8\u91cf\u548c\u7c7b\u3002<\/p>\n<\/p>\n<p><h4>2.2 \u4f7f\u7528dir()\u51fd\u6570\u67e5\u770b\u6a21\u5757\u5185\u5bb9<\/h4>\n<\/p>\n<p><p>\u4f8b\u5982\uff0c\u67e5\u770b <code>math<\/code> \u6a21\u5757\u4e2d\u7684\u6240\u6709\u5c5e\u6027\u548c\u65b9\u6cd5\uff1a<\/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>\u8f93\u51fa\u5c06\u5305\u542b <code>math<\/code> \u6a21\u5757\u4e2d\u7684\u6240\u6709\u51fd\u6570\u548c\u5e38\u91cf\uff0c\u5982 <code>sqrt<\/code>, <code>sin<\/code>, <code>pi<\/code> \u7b49\u3002\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u53ef\u4ee5\u5feb\u901f\u4e86\u89e3\u6a21\u5757\u4e2d\u5305\u542b\u7684\u6240\u6709\u5185\u5bb9\u3002<\/p>\n<\/p>\n<p><h4>2.3 \u4f7f\u7528dir()\u51fd\u6570\u67e5\u770b\u81ea\u5b9a\u4e49\u6a21\u5757\u5185\u5bb9<\/h4>\n<\/p>\n<p><p>\u5bf9\u4e8e\u81ea\u5b9a\u4e49\u6a21\u5757\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528 <code>dir()<\/code> \u51fd\u6570\u6765\u67e5\u770b\u5176\u5185\u5bb9\u3002\u4f8b\u5982\uff0c\u6709\u4e00\u4e2a\u81ea\u5b9a\u4e49\u6a21\u5757 <code>my_module.py<\/code>\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># my_module.py<\/p>\n<p>def foo():<\/p>\n<p>    &quot;&quot;&quot;This is foo function&quot;&quot;&quot;<\/p>\n<p>    pass<\/p>\n<p>def bar():<\/p>\n<p>    &quot;&quot;&quot;This is bar function&quot;&quot;&quot;<\/p>\n<p>    pass<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u53e6\u4e00\u4e2a\u811a\u672c\u4e2d\u67e5\u770b <code>my_module<\/code> \u6a21\u5757\u7684\u5185\u5bb9\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import my_module<\/p>\n<p>print(dir(my_module))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8f93\u51fa\u5c06\u5305\u542b <code>foo<\/code> \u548c <code>bar<\/code> \u51fd\u6570\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u5229\u7528help()\u51fd\u6570<\/h3>\n<\/p>\n<p><h4>3.1 help()\u51fd\u6570\u7684\u6982\u8ff0<\/h4>\n<\/p>\n<p><p><code>help()<\/code> \u662fPython\u7684\u5185\u7f6e\u51fd\u6570\uff0c\u7528\u4e8e\u63d0\u4f9b\u6a21\u5757\u3001\u51fd\u6570\u3001\u7c7b\u7b49\u5bf9\u8c61\u7684\u8be6\u7ec6\u5e2e\u52a9\u4fe1\u606f\u3002\u5b83\u5305\u62ec\u6587\u6863\u5b57\u7b26\u4e32\u3001\u53c2\u6570\u5217\u8868\u3001\u8fd4\u56de\u503c\u7b49\u8be6\u7ec6\u4fe1\u606f\uff0c\u5bf9\u4e8e\u6df1\u5165\u4e86\u89e3\u6a21\u5757\u548c\u51fd\u6570\u975e\u5e38\u6709\u5e2e\u52a9\u3002<\/p>\n<\/p>\n<p><h4>3.2 \u4f7f\u7528help()\u51fd\u6570\u67e5\u770b\u6a21\u5757\u5e2e\u52a9\u4fe1\u606f<\/h4>\n<\/p>\n<p><p>\u4f8b\u5982\uff0c\u67e5\u770b <code>math<\/code> \u6a21\u5757\u7684\u5e2e\u52a9\u4fe1\u606f\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import math<\/p>\n<p>help(math)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8f93\u51fa\u5c06\u5305\u542b <code>math<\/code> \u6a21\u5757\u7684\u8be6\u7ec6\u8bf4\u660e\u3001\u51fd\u6570\u5217\u8868\u548c\u6bcf\u4e2a\u51fd\u6570\u7684\u7528\u9014\u3002<\/p>\n<\/p>\n<p><h4>3.3 \u4f7f\u7528help()\u51fd\u6570\u67e5\u770b\u51fd\u6570\u5e2e\u52a9\u4fe1\u606f<\/h4>\n<\/p>\n<p><p>\u4f8b\u5982\uff0c\u67e5\u770b <code>math<\/code> \u6a21\u5757\u4e2d <code>sqrt<\/code> \u51fd\u6570\u7684\u5e2e\u52a9\u4fe1\u606f\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">help(math.sqrt)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8f93\u51fa\u5c06\u5305\u542b <code>sqrt<\/code> \u51fd\u6570\u7684\u8be6\u7ec6\u8bf4\u660e\u3001\u53c2\u6570\u5217\u8868\u548c\u7528\u9014\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u67e5\u770b\u5b98\u65b9\u6587\u6863<\/h3>\n<\/p>\n<p><h4>4.1 \u5b98\u65b9\u6587\u6863\u7684\u91cd\u8981\u6027<\/h4>\n<\/p>\n<p><p>Python\u5b98\u65b9\u6587\u6863\u662f\u4e86\u89e3\u6a21\u5757\u548c\u51fd\u6570\u7684\u6700\u4f73\u6765\u6e90\u3002\u5b98\u65b9\u6587\u6863\u63d0\u4f9b\u4e86\u8be6\u5c3d\u7684\u63cf\u8ff0\u3001\u793a\u4f8b\u548c\u4f7f\u7528\u65b9\u6cd5\uff0c\u662f\u5f00\u53d1\u8005\u83b7\u53d6\u6743\u5a01\u4fe1\u606f\u7684\u91cd\u8981\u9014\u5f84\u3002<\/p>\n<\/p>\n<p><h4>4.2 \u8bbf\u95ee\u5b98\u65b9\u6587\u6863<\/h4>\n<\/p>\n<p><p>\u4f8b\u5982\uff0c\u67e5\u770b <code>math<\/code> \u6a21\u5757\u7684\u5b98\u65b9\u6587\u6863\uff0c\u53ef\u4ee5\u8bbf\u95ee\u4ee5\u4e0b\u94fe\u63a5\uff1a<\/p>\n<p><a href=\"https:\/\/docs.python.org\/3\/library\/math.html\">Python \u5b98\u65b9\u6587\u6863 &#8211; math \u6a21\u5757<\/a><\/p>\n<\/p>\n<p><p>\u5728\u5b98\u65b9\u6587\u6863\u4e2d\uff0c\u53ef\u4ee5\u67e5\u627e\u5230\u6bcf\u4e2a\u51fd\u6570\u7684\u8be6\u7ec6\u8bf4\u660e\u548c\u793a\u4f8b\u4ee3\u7801\uff0c\u5e2e\u52a9\u5f00\u53d1\u8005\u6b63\u786e\u4f7f\u7528\u51fd\u6570\u3002<\/p>\n<\/p>\n<p><h3>\u4e94\u3001\u4f7f\u7528\u7b2c\u4e09\u65b9\u5de5\u5177<\/h3>\n<\/p>\n<p><h4>5.1 \u7b2c\u4e09\u65b9\u5de5\u5177\u7684\u6982\u8ff0<\/h4>\n<\/p>\n<p><p>\u4e00\u4e9b\u7b2c\u4e09\u65b9\u5de5\u5177\u548cIDE\uff08\u5982PyCharm\u3001VS Code\uff09\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u4ee3\u7801\u8865\u5168\u548c\u6587\u6863\u67e5\u770b\u529f\u80fd\uff0c\u53ef\u4ee5\u5e2e\u52a9\u5f00\u53d1\u8005\u5feb\u901f\u67e5\u770b\u6a21\u5757\u548c\u51fd\u6570\u7684\u6587\u6863\u3002\u8fd9\u4e9b\u5de5\u5177\u901a\u5e38\u96c6\u6210\u4e86\u6587\u6863\u5b57\u7b26\u4e32\u548c\u5b98\u65b9\u6587\u6863\uff0c\u63d0\u4f9b\u4e86\u4fbf\u6377\u7684\u6587\u6863\u67e5\u770b\u65b9\u5f0f\u3002<\/p>\n<\/p>\n<p><h4>5.2 \u5728PyCharm\u4e2d\u67e5\u770b\u6587\u6863<\/h4>\n<\/p>\n<p><p>\u4f8b\u5982\uff0c\u5728PyCharm\u4e2d\uff0c\u5c06\u5149\u6807\u653e\u5728\u51fd\u6570\u6216\u6a21\u5757\u540d\u79f0\u4e0a\uff0c\u7136\u540e\u6309 <code>Ctrl+Q<\/code>\uff08Windows\uff09\u6216 <code>Ctrl+J<\/code>\uff08Mac\uff09\uff0c\u53ef\u4ee5\u67e5\u770b\u8be6\u7ec6\u7684\u6587\u6863\u4fe1\u606f\u3002<\/p>\n<\/p>\n<p><h4>5.3 \u5728VS Code\u4e2d\u67e5\u770b\u6587\u6863<\/h4>\n<\/p>\n<p><p>\u5728VS Code\u4e2d\uff0c\u5c06\u5149\u6807\u653e\u5728\u51fd\u6570\u6216\u6a21\u5757\u540d\u79f0\u4e0a\uff0c\u7136\u540e\u6309 <code>Ctrl+Shift+Space<\/code> \u6216 <code>F12<\/code>\uff0c\u53ef\u4ee5\u67e5\u770b\u8be6\u7ec6\u7684\u6587\u6863\u4fe1\u606f\u548c\u5b9a\u4e49\u3002<\/p>\n<\/p>\n<p><h3>\u516d\u3001\u901a\u8fc7\u6ce8\u91ca\u548c\u4ee3\u7801\u9605\u8bfb<\/h3>\n<\/p>\n<p><h4>6.1 \u6ce8\u91ca\u7684\u91cd\u8981\u6027<\/h4>\n<\/p>\n<p><p>\u826f\u597d\u7684\u4ee3\u7801\u6ce8\u91ca\u662f\u4ee3\u7801\u53ef\u8bfb\u6027\u7684\u91cd\u8981\u4fdd\u969c\u3002\u5f00\u53d1\u8005\u5728\u7f16\u5199\u4ee3\u7801\u65f6\uff0c\u5e94\u5c3d\u91cf\u6dfb\u52a0\u6709\u610f\u4e49\u7684\u6ce8\u91ca\uff0c\u89e3\u91ca\u4ee3\u7801\u7684\u529f\u80fd\u3001\u903b\u8f91\u548c\u4f7f\u7528\u65b9\u6cd5\u3002\u901a\u8fc7\u9605\u8bfb\u6ce8\u91ca\uff0c\u5176\u4ed6\u5f00\u53d1\u8005\u53ef\u4ee5\u66f4\u5bb9\u6613\u5730\u7406\u89e3\u4ee3\u7801\u7684\u610f\u56fe\u548c\u5b9e\u73b0\u3002<\/p>\n<\/p>\n<p><h4>6.2 \u9605\u8bfb\u4ee3\u7801<\/h4>\n<\/p>\n<p><p>\u9605\u8bfb\u4ee3\u7801\u662f\u4e86\u89e3\u6a21\u5757\u548c\u51fd\u6570\u7684\u6700\u76f4\u63a5\u65b9\u5f0f\u3002\u901a\u8fc7\u9605\u8bfb\u4ee3\u7801\uff0c\u53ef\u4ee5\u6df1\u5165\u4e86\u89e3\u6a21\u5757\u548c\u51fd\u6570\u7684\u5b9e\u73b0\u7ec6\u8282\u3001\u4f9d\u8d56\u5173\u7cfb\u548c\u903b\u8f91\u7ed3\u6784\u3002\u8fd9\u5bf9\u4e8e\u8c03\u8bd5\u548c\u4f18\u5316\u4ee3\u7801\u975e\u5e38\u6709\u5e2e\u52a9\u3002<\/p>\n<\/p>\n<p><h3>\u4e03\u3001\u4f7f\u7528IPython\u548cJupyter Notebook<\/h3>\n<\/p>\n<p><h4>7.1 IPython\u7684\u6982\u8ff0<\/h4>\n<\/p>\n<p><p>IPython\u662f\u4e00\u4e2a\u4ea4\u4e92\u5f0f\u7684Python\u89e3\u91ca\u5668\uff0c\u63d0\u4f9b\u4e86\u66f4\u5f3a\u5927\u7684\u4ea4\u4e92\u529f\u80fd\u548c\u66f4\u53cb\u597d\u7684\u7528\u6237\u4f53\u9a8c\u3002IPython\u652f\u6301\u81ea\u52a8\u8865\u5168\u3001\u5185\u8054\u6587\u6863\u67e5\u770b\u7b49\u529f\u80fd\uff0c\u662f\u5f00\u53d1\u8005\u63a2\u7d22\u6a21\u5757\u548c\u51fd\u6570\u7684\u5229\u5668\u3002<\/p>\n<\/p>\n<p><h4>7.2 \u5728IPython\u4e2d\u67e5\u770b\u6a21\u5757\u548c\u51fd\u6570<\/h4>\n<\/p>\n<p><p>\u4f8b\u5982\uff0c\u5728IPython\u4e2d\u67e5\u770b <code>math<\/code> \u6a21\u5757\u7684\u6587\u6863\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import math<\/p>\n<p>math?<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u67e5\u770b <code>math<\/code> \u6a21\u5757\u4e2d <code>sqrt<\/code> \u51fd\u6570\u7684\u6587\u6863\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">math.sqrt?<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>7.3 Jupyter Notebook\u7684\u6982\u8ff0<\/h4>\n<\/p>\n<p><p>Jupyter Notebook\u662f\u4e00\u4e2a\u57fa\u4e8eWeb\u7684\u4ea4\u4e92\u5f0f\u8ba1\u7b97\u73af\u5883\uff0c\u652f\u6301Python\u7b49\u591a\u79cd\u7f16\u7a0b\u8bed\u8a00\u3002Jupyter Notebook\u4e0d\u4ec5\u652f\u6301\u4ee3\u7801\u7f16\u5199\u548c\u8fd0\u884c\uff0c\u8fd8\u652f\u6301\u6587\u6863\u7f16\u5199\u3001\u6570\u636e\u53ef\u89c6\u5316\u7b49\u529f\u80fd\uff0c\u975e\u5e38\u9002\u5408\u6570\u636e\u5206\u6790\u548c<a href=\"https:\/\/docs.pingcode.com\/ask\/59192.html\" target=\"_blank\">\u673a\u5668\u5b66\u4e60<\/a>\u5f00\u53d1\u3002<\/p>\n<\/p>\n<p><h4>7.4 \u5728Jupyter Notebook\u4e2d\u67e5\u770b\u6587\u6863<\/h4>\n<\/p>\n<p><p>\u5728Jupyter Notebook\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u5728\u4ee3\u7801\u5355\u5143\u683c\u4e2d\u8f93\u5165\u51fd\u6570\u540d\u79f0\u540e\u52a0\u95ee\u53f7 <code>?<\/code> \u6765\u67e5\u770b\u6587\u6863\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import math<\/p>\n<p>math.sqrt?<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8f93\u51fa\u5c06\u5305\u542b <code>sqrt<\/code> \u51fd\u6570\u7684\u8be6\u7ec6\u6587\u6863\u3002<\/p>\n<\/p>\n<p><h3>\u516b\u3001\u4f7f\u7528\u7b2c\u4e09\u65b9\u5e93\u5982Pydoc<\/h3>\n<\/p>\n<p><h4>8.1 Pydoc\u7684\u6982\u8ff0<\/h4>\n<\/p>\n<p><p>Pydoc\u662fPython\u6807\u51c6\u5e93\u4e2d\u7684\u4e00\u4e2a\u6a21\u5757\uff0c\u7528\u4e8e\u751f\u6210Python\u6a21\u5757\u3001\u7c7b\u3001\u51fd\u6570\u7b49\u7684\u6587\u6863\u3002Pydoc\u53ef\u4ee5\u5728\u547d\u4ee4\u884c\u4e2d\u4f7f\u7528\uff0c\u4e5f\u53ef\u4ee5\u751f\u6210HTML\u683c\u5f0f\u7684\u6587\u6863\u3002<\/p>\n<\/p>\n<p><h4>8.2 \u4f7f\u7528Pydoc\u67e5\u770b\u6a21\u5757\u6587\u6863<\/h4>\n<\/p>\n<p><p>\u5728\u547d\u4ee4\u884c\u4e2d\u4f7f\u7528Pydoc\u67e5\u770b\u6a21\u5757\u6587\u6863\uff0c\u4f8b\u5982\u67e5\u770b <code>math<\/code> \u6a21\u5757\u7684\u6587\u6863\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-sh\">pydoc math<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8f93\u51fa\u5c06\u5305\u542b <code>math<\/code> \u6a21\u5757\u7684\u8be6\u7ec6\u6587\u6863\u3002<\/p>\n<\/p>\n<p><h4>8.3 \u751f\u6210HTML\u683c\u5f0f\u7684\u6587\u6863<\/h4>\n<\/p>\n<p><p>\u4f7f\u7528Pydoc\u751f\u6210HTML\u683c\u5f0f\u7684\u6587\u6863\uff0c\u4f8b\u5982\u751f\u6210 <code>math<\/code> \u6a21\u5757\u7684HTML\u6587\u6863\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-sh\">pydoc -w math<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8be5\u547d\u4ee4\u5c06\u5728\u5f53\u524d\u76ee\u5f55\u751f\u6210\u4e00\u4e2a <code>math.html<\/code> \u6587\u4ef6\uff0c\u5305\u542b <code>math<\/code> \u6a21\u5757\u7684\u8be6\u7ec6\u6587\u6863\u3002<\/p>\n<\/p>\n<p><h3>\u4e5d\u3001\u901a\u8fc7\u793e\u533a\u8d44\u6e90\u548c\u5728\u7ebf\u5e73\u53f0<\/h3>\n<\/p>\n<p><h4>9.1 \u793e\u533a\u8d44\u6e90\u7684\u91cd\u8981\u6027<\/h4>\n<\/p>\n<p><p>Python\u793e\u533a\u662f\u4e00\u4e2a\u6d3b\u8dc3\u4e14\u53cb\u597d\u7684\u5f00\u53d1\u8005\u793e\u533a\u3002\u901a\u8fc7\u793e\u533a\u8d44\u6e90\u548c\u5728\u7ebf\u5e73\u53f0\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u83b7\u53d6\u6a21\u5757\u548c\u51fd\u6570\u7684\u4f7f\u7528\u7ecf\u9a8c\u3001\u793a\u4f8b\u4ee3\u7801\u548c\u6700\u4f73\u5b9e\u8df5\u3002\u8fd9\u4e9b\u8d44\u6e90\u5bf9\u4e8e\u89e3\u51b3\u5b9e\u9645\u95ee\u9898\u548c\u63d0\u9ad8\u5f00\u53d1\u6548\u7387\u975e\u5e38\u6709\u5e2e\u52a9\u3002<\/p>\n<\/p>\n<p><h4>9.2 \u4f7f\u7528Stack Overflow<\/h4>\n<\/p>\n<p><p>Stack Overflow\u662f\u4e00\u4e2a\u77e5\u540d\u7684\u95ee\u7b54\u5e73\u53f0\uff0c\u62e5\u6709\u5927\u91cf\u4e0ePython\u76f8\u5173\u7684\u95ee\u9898\u548c\u7b54\u6848\u3002\u901a\u8fc7\u641c\u7d22\u6216\u63d0\u95ee\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u83b7\u53d6\u6a21\u5757\u548c\u51fd\u6570\u7684\u8be6\u7ec6\u4fe1\u606f\u548c\u4f7f\u7528\u793a\u4f8b\u3002<\/p>\n<\/p>\n<p><h4>9.3 \u4f7f\u7528GitHub<\/h4>\n<\/p>\n<p><p>GitHub\u662f\u4e00\u4e2a\u6d41\u884c\u7684\u4ee3\u7801\u6258\u7ba1\u5e73\u53f0\uff0c\u62e5\u6709\u5927\u91cf\u5f00\u6e90\u7684Python\u9879\u76ee\u3002\u901a\u8fc7\u67e5\u770b\u5f00\u6e90\u9879\u76ee\u7684\u4ee3\u7801\u548c\u6587\u6863\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u5b66\u4e60\u6a21\u5757\u548c\u51fd\u6570\u7684\u4f7f\u7528\u65b9\u6cd5\u548c\u5b9e\u73b0\u7ec6\u8282\u3002<\/p>\n<\/p>\n<p><h4>9.4 \u4f7f\u7528Python Package Index (PyPI)<\/h4>\n<\/p>\n<p><p>PyPI\u662fPython\u7684\u5305\u7ba1\u7406\u5e73\u53f0\uff0c\u63d0\u4f9b\u4e86\u5927\u91cf\u7b2c\u4e09\u65b9\u5e93\u548c\u6a21\u5757\u3002\u6bcf\u4e2a\u5305\u901a\u5e38\u5305\u542b\u8be6\u7ec6\u7684\u6587\u6863\u548c\u793a\u4f8b\u4ee3\u7801\uff0c\u53ef\u4ee5\u5e2e\u52a9\u5f00\u53d1\u8005\u4e86\u89e3\u6a21\u5757\u548c\u51fd\u6570\u7684\u4f7f\u7528\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><h3>\u5341\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u4e86\u89e3Python\u6a21\u5757\u548c\u51fd\u6570\u7684\u65b9\u6cd5\u6709\u5f88\u591a\uff0c\u5305\u62ec\u901a\u8fc7\u6587\u6863\u5b57\u7b26\u4e32\u3001\u4f7f\u7528dir()\u51fd\u6570\u3001\u5229\u7528help()\u51fd\u6570\u3001\u67e5\u770b\u5b98\u65b9\u6587\u6863\u3001\u4f7f\u7528\u7b2c\u4e09\u65b9\u5de5\u5177\u3001\u901a\u8fc7\u6ce8\u91ca\u548c\u4ee3\u7801\u9605\u8bfb\u3001\u4f7f\u7528IPython\u548cJupyter Notebook\u3001\u4f7f\u7528\u7b2c\u4e09\u65b9\u5e93\u5982Pydoc\u4ee5\u53ca\u901a\u8fc7\u793e\u533a\u8d44\u6e90\u548c\u5728\u7ebf\u5e73\u53f0\u3002\u6bcf\u79cd\u65b9\u6cd5\u90fd\u6709\u5176\u72ec\u7279\u7684\u4f18\u52bf\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u6839\u636e\u5177\u4f53\u60c5\u51b5\u9009\u62e9\u6700\u5408\u9002\u7684\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><p>\u901a\u8fc7\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u6df1\u5165\u4e86\u89e3Python\u6a21\u5757\u548c\u51fd\u6570\u7684\u529f\u80fd\u3001\u4f7f\u7528\u65b9\u6cd5\u548c\u5b9e\u73b0\u7ec6\u8282\uff0c\u4ece\u800c\u63d0\u9ad8\u5f00\u53d1\u6548\u7387\u548c\u4ee3\u7801\u8d28\u91cf\u3002\u5e0c\u671b\u672c\u6587\u63d0\u4f9b\u7684\u8be6\u7ec6\u8bb2\u89e3\u548c\u793a\u4f8b\u4ee3\u7801\u80fd\u5e2e\u52a9\u8bfb\u8005\u66f4\u597d\u5730\u638c\u63e1\u67e5\u770bPython\u6a21\u5757\u51fd\u6570\u65b9\u6cd5\u7684\u6280\u5de7\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5feb\u901f\u67e5\u627ePython\u6a21\u5757\u4e2d\u7684\u51fd\u6570\u548c\u65b9\u6cd5\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u5185\u7f6e\u7684<code>dir()<\/code>\u51fd\u6570\u67e5\u770b\u6a21\u5757\u4e2d\u7684\u6240\u6709\u5c5e\u6027\u548c\u65b9\u6cd5\u3002\u4f8b\u5982\uff0c\u5bfc\u5165\u6a21\u5757\u540e\uff0c\u4f7f\u7528<code>dir(module_name)<\/code>\u53ef\u4ee5\u5217\u51fa\u8be5\u6a21\u5757\u7684\u6240\u6709\u53ef\u7528\u51fd\u6570\u548c\u65b9\u6cd5\u3002\u6b64\u5916\uff0c\u7ed3\u5408<code>help()<\/code>\u51fd\u6570\uff0c\u53ef\u4ee5\u83b7\u53d6\u66f4\u8be6\u7ec6\u7684\u6587\u6863\u8bf4\u660e\uff0c\u4f7f\u7528<code>help(module_name)<\/code>\u5373\u53ef\u67e5\u770b\u6a21\u5757\u7684\u6587\u6863\u3002<\/p>\n<p><strong>\u6709\u54ea\u4e9b\u5de5\u5177\u53ef\u4ee5\u5e2e\u52a9\u6211\u66f4\u597d\u5730\u63a2\u7d22Python\u6a21\u5757\u7684\u51fd\u6570\u548c\u65b9\u6cd5\uff1f<\/strong><br \/>\u6709\u591a\u79cd\u5de5\u5177\u53ef\u4ee5\u5e2e\u52a9\u5f00\u53d1\u8005\u66f4\u597d\u5730\u7406\u89e3Python\u6a21\u5757\u7684\u7ed3\u6784\u3002\u5e38\u7528\u7684\u5de5\u5177\u5305\u62ecJupyter Notebook\uff0c\u5b83\u63d0\u4f9b\u4e86\u4ea4\u4e92\u5f0f\u7684\u73af\u5883\uff0c\u65b9\u4fbf\u4f7f\u7528<code>?<\/code>\u6216<code>help()<\/code>\u6765\u67e5\u8be2\u51fd\u6570\u7684\u5177\u4f53\u7528\u6cd5\u3002IDE\u5982PyCharm\u6216VSCode\u4e5f\u6709\u5185\u7f6e\u7684\u6587\u6863\u67e5\u770b\u548c\u81ea\u52a8\u8865\u5168\u529f\u80fd\uff0c\u80fd\u591f\u5feb\u901f\u663e\u793a\u6a21\u5757\u4e2d\u7684\u51fd\u6570\u548c\u65b9\u6cd5\u3002<\/p>\n<p><strong>\u5982\u4f55\u901a\u8fc7\u5728\u7ebf\u6587\u6863\u83b7\u53d6Python\u6a21\u5757\u7684\u51fd\u6570\u548c\u65b9\u6cd5\u4fe1\u606f\uff1f<\/strong><br \/>Python\u7684\u5b98\u65b9\u7f51\u7ad9\u53ca\u5176\u5404\u4e2a\u6a21\u5757\u7684\u5b98\u65b9\u6587\u6863\u662f\u67e5\u627e\u51fd\u6570\u548c\u65b9\u6cd5\u4fe1\u606f\u7684\u91cd\u8981\u8d44\u6e90\u3002\u8bbf\u95ee<a href=\"https:\/\/docs.python.org\/3\/\">Python\u5b98\u65b9\u6587\u6863<\/a>\u53ef\u4ee5\u627e\u5230\u5404\u4e2a\u6a21\u5757\u7684\u8be6\u7ec6\u8bf4\u660e\uff0c\u901a\u5e38\u5305\u62ec\u51fd\u6570\u7684\u53c2\u6570\u3001\u8fd4\u56de\u503c\u53ca\u793a\u4f8b\u4ee3\u7801\u3002\u6b64\u5916\uff0c\u50cfRead the Docs\u7b49\u5e73\u53f0\u4e5f\u63d0\u4f9b\u4e86\u8bb8\u591a\u7b2c\u4e09\u65b9\u5e93\u7684\u6587\u6863\uff0c\u4fbf\u4e8e\u5f00\u53d1\u8005\u67e5\u627e\u6240\u9700\u4fe1\u606f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5982\u4f55\u67e5\u770bPython\u6a21\u5757\u51fd\u6570\u65b9\u6cd5\uff1a \u901a\u8fc7\u6587\u6863\u5b57\u7b26\u4e32\u3001\u4f7f\u7528dir()\u51fd\u6570\u3001\u5229\u7528help()\u51fd\u6570\u3001\u67e5\u770b\u5b98\u65b9\u6587\u6863\u3001\u4f7f [&hellip;]","protected":false},"author":3,"featured_media":1169702,"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\/1169693"}],"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=1169693"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1169693\/revisions"}],"predecessor-version":[{"id":1169704,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1169693\/revisions\/1169704"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1169702"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1169693"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1169693"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1169693"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}