pet_set is a lazy object that only makes a call to the dtabase when you begin to iterate over it. When the queryset is evaluated it will caches the results so latter calls to pet_set will not also call the database.
pet_set = Pet.objects.filter(species="Dog")