sardanameta.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:sardana 作者: sardana-org 项目源码 文件源码
def findsource(obj):
    """Return the entire source file and starting line number for an object.

    The argument may be a module, class, method, function, traceback, frame,
    or code object.  The source code is returned as a list of all the lines
    in the file and the line number indexes a line in that list.  An IOError
    is raised if the source code cannot be retrieved."""
    filename = inspect.getsourcefile(obj)
    if filename:
        linecache.checkcache(filename)
    return inspect.findsource(obj)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号