![](/img/trans.png)
[英]What's the best way to sort class definitions in a python source file?
[英]What is the best way to consult the source code of a Python class?
好吧,我正在使用argparse
Python package 并想检查它的实现以找出一些架构点。
我的机器上安装了Python 3.6.9
,我想可以在本地检查它,有没有办法?
无论如何,欢迎任何替代方案!
要在本地检查,它将位于 Python 安装中,位于/usr/lib/python3.6/argparse.py
之类的路径中。 或者,您可以在线查看: https://github.com/python/cpython/blob/v3.6.9/Lib/argparse.py
纯 python 模块包括对其在磁盘上的位置的引用。 只是
import argparse
print(argparse.__file__)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.