def _getval(self):
        if self._larch is not None and self._expr is not None and not self.vary:
            if self._ast is None:
                self._expr = self._expr.strip()
                self._ast = self._larch.parse(self._expr)
                if self._ast is None:
                    self._larch.writer.write(self.__invalid % self._expr)
            if self._ast is not None:
                self._val = self._larch.run(self._ast, expr=self._expr)
                # self._larch.symtable.save_frame()
                # self._larch.symtable.restore_frame()

        if self.min is None: self.min = -inf
        if self.max is None: self.max =  inf
        if self.max < self.min:
            self.max, self.min = self.min, self.max

        try:
            if self.min > -inf:
               self._val = max(self.min, self._val)
            if self.max < inf:
                self._val = min(self.max, self._val)
        except(TypeError, __HOLE__):
            self._val = nan
        if isinstance(self._val, Parameter):
            self._val = self._val.value
        return self._val
dataset/ETHPy150Open xraypy/xraylarch/lib/fitting/parameter.py/Parameter._getval