png.py 文件源码

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

项目:codingTheMatrix 作者: RestrictedZone 项目源码 文件源码
def mycallersname():
    """Returns the name of the caller of the caller of this function
    (hence the name of the caller of the function in which
    "mycallersname()" textually appears).  Returns None if this cannot
    be determined."""

    # http://docs.python.org/library/inspect.html#the-interpreter-stack
    import inspect

    frame = inspect.currentframe()
    if not frame:
        return None
    frame_,filename_,lineno_,funname,linelist_,listi_ = (
      inspect.getouterframes(frame)[2])
    return funname
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号