def __init__(self, exprs=(), sleep=0, trace=False):
        super(ExecComp, self).__init__()
        outs = set()
        allvars = set()
        self.exprs = exprs
        self.codes = [compile(expr,'<string>','exec') for expr in exprs]
        self.sleep = sleep
        self.trace = trace
        for expr in exprs:
            lhs,rhs = expr.split('=')
            lhs = lhs.strip()
            lhs = lhs.split(',')
            outs.update(lhs)
            expreval = ExprEvaluator(expr, scope=self)
            allvars.update(expreval.get_referenced_varpaths(copy=False))

        for var in allvars:
            if '.' not in var:  # if a varname has dots, it's outside of our scope,
                                # so don't add a trait for it
                if var in outs:
                    iotype = 'out'
                else:
                    iotype = 'in'
                self.add(var, Float(0.0, iotype=iotype))
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.test/src/openmdao/test/execcomp.py/ExecComp.__init__/original