_numeric.py 文件源码

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

项目:tidy 作者: cyrus- 项目源码 文件源码
def translate_pat_Num(self, ctx, pat, scrutinee_trans):
        scrutinee_trans_copy = astx.copy_node(scrutinee_trans)
        comparator = astx.copy_node(pat)
        n = pat.n
        if not isinstance(n, complex):
            comparator.n = complex(n)
        condition = ast.Compare(
            left=scrutinee_trans_copy,
            ops=[ast.Eq()],
            comparators=[comparator])
        return (condition, _util.odict())
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号