On 13/02/13 04:32, neubyr wrote:
I am not following your comment on opening books file twice in list_by_author method. I have opened it only once and then reading each line while checking for a regex match. Am I missing something?
You open the catalog file once to read the books in the first place. Then when you want a list of books by author Fred, you open the catalog file, even though all the books are (somewhere) in memory. Then when you want a list of books by author Bob, you open the catalog file again. Then when you want a list of books by Sally, you open the catalog file yet again. And so on. -- Steven _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor