Django: what's the simplest way to test if object is in set
===

Just a non-critical question that has bothered me after trying to find answers in the doc to no avail.

    class Book(models.Model)
        authors = ManyToManyField(Author)

    homer = Author.objects.get(pk=1)
    iliad = Book.objects.get(pk=2)

    iliad.authors.filter(pk=homer.pk).exists()
    Book.objects.filter(name='Iliad', authors__in=homer).exists()

I believe the last two asserts will test if Homer is the author of Iliad. But I kind of dislike the (pk=homer.pk) portion and am wondering if there's any construct that will allow me to test if an object (assuming we already have it from a "get") exists in a queryset?

    (homer in iliad.authors)

While the above expression may also work, and is arguably more pythonic, it may retrieve unnecessarily too many authors back from DB.