qdb.py 文件源码

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

项目:StuffShare 作者: StuffShare 项目源码 文件源码
def do_environment(self):
        "return current frame local and global environment"
        env = {'locals': {}, 'globals': {}}
        # converts the frame global and locals to a short text representation:
        if self.frame:
            for name, value in self.frame_locals.items():
                env['locals'][name] = pydoc.cram(repr(
                    value), 255), repr(type(value))
            for name, value in self.frame.f_globals.items():
                env['globals'][name] = pydoc.cram(repr(
                    value), 20), repr(type(value))
        return env
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号