Being more pythonic