Did I find the right examples for you? yes no

All Samples(26)  |  Call(25)  |  Derive(0)  |  Import(1)

src/s/h/shedskin-HEAD/shedskin/graph.py   shedskin(Download)
 
from error import error
from infer import inode, in_out, CNode, default_var, register_temp_var
from python import StaticClass, lookup_func, Function, is_zip2, \
    lookup_class, is_method, is_literal, is_enum, lookup_var, assign_rec, \
    def fake_func(self, node, objexpr, attrname, args, func):
        if (node, 0, 0) in self.gx.cnode:  # XXX
            newnode = self.gx.cnode[node, 0, 0]
        else:
            newnode = CNode(self.gx, node, parent=func, mv=getmv())
    def instance(self, node, cl, func=None):
        if (node, 0, 0) in self.gx.cnode:  # XXX to create_node() func
            newnode = self.gx.cnode[node, 0, 0]
        else:
            newnode = CNode(self.gx, node, parent=func, mv=getmv())
        self.visit(fakefunc, func)
 
        fakechildnode = CNode(self.gx, (child, varname), parent=func, mv=getmv())  # create separate 'fake' CNode per child, so we can have multiple 'callfuncs'
        self.gx.types[fakechildnode] = set()
 
    def visitGenExpr(self, node, func=None):
        newnode = CNode(self.gx, node, parent=func, mv=getmv())
        self.gx.types[newnode] = set()
        lc = ListComp(node.code.expr, [ListCompFor(qual.assign, qual.iter, qual.ifs, qual.lineno) for qual in node.code.quals], lineno=node.lineno)
        register_node(lc, func)