Skip to content

Instantly share code, notes, and snippets.

@hansonkd
Last active January 16, 2017 15:15
Show Gist options
  • Save hansonkd/596a4ac0ba6d72f4f96f7f0f6ce1f312 to your computer and use it in GitHub Desktop.
Save hansonkd/596a4ac0ba6d72f4f96f7f0f6ce1f312 to your computer and use it in GitHub Desktop.
books = get_book_row_generator_from_csv('mybooks.csv')
formatted_books = list(
map(
sorted(
filter(
map(
books,
Book.from_row
),
lambda: book.year >= 1950
),
key=lambda book: (book.year, book.author_name.lower())
),
'{0.title} | {0.author} ({0.year})'.format
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment