Hacker News new | past | comments | ask | show | jobs | submit login

You could make read_portfolio a generator ( https://wiki.python.org/moin/Generators ). But that might confuse inexperienced Python programmers.

Personally the way you've done it is the most Pythonic IMO. List comprehensions are great but would be less readable in this case.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: