> Likewise, the above is basically just an inefficient way of writing: > > def date_key(book): > return book.data > > def author_and_date_key(book): > return (author_key(book), date_key(book))
It's certainly more elegant, but I wanted to talk about the mechanics of comparison functions =) I don't know that it's more or less efficient in execution. That depends on a few factors. -- http://mail.python.org/mailman/listinfo/python-list