FWIW I think you could write this as
```
self._reasons = dict([(getattr(converged_reason,r), r) for r in dir(converged_reason) if not e.startswith('_')])
```