Consider getattr(self.config, 'visc{}'.format(c)) instead of the eval.