special.py 文件源码

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

项目:metapensiero.pj 作者: azazel75 项目源码 文件源码
def Compare_in(t, x):
    if not isinstance(x.ops[0], (ast.NotIn, ast.In)):
        return
    if t.enable_snippets:
        from ..snippets import _in, in_es6
        if t.enable_es6:
            t.add_snippet(in_es6)
            sname = 'in_es6'
        else:
            t.add_snippet(_in)
            sname = '_in'
        result = JSCall(JSAttribute('_pj', sname), [x.left, x.comparators[0]])
        if isinstance(x.ops[0], ast.NotIn):
            result = JSUnaryOp(JSOpNot(), result)
        return result
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号