cinap_lenrekadd hg and python4bb9e2215 years agoHistory
1533 lines · 46.1 KB · Python
RawDownload
    support the variant visit methods.    """    def __init__(self, obj):        self.obj = obj     def __getattr__(self, attr):        return getattr(self.obj, attr) class AugGetattr(Delegator):    pass class AugName(Delegator):    pass class AugSlice(Delegator):    pass class AugSubscript(Delegator):    pass wrapper = {    ast.Getattr: AugGetattr,    ast.Name: AugName,    ast.Slice: AugSlice,    ast.Subscript: AugSubscript,    } def wrap_aug(node):    return wrapper[node.__class__](node) if __name__ == "__main__":    for file in sys.argv[1:]:        compileFile(file)

Lines 1501–1533 of 1533. Previous lines