tools.py 文件源码

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

项目:fatoptimizer 作者: vstinner 项目源码 文件源码
def _set_lineno(node, lineno, col_offset):
    if 'lineno' in node._attributes:
        if not hasattr(node, 'lineno'):
            node.lineno = lineno
    if 'col_offset' in node._attributes:
        if not hasattr(node, 'col_offset'):
            node.col_offset = col_offset
    for child in ast.iter_child_nodes(node):
        _set_lineno(child, lineno, col_offset)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号