This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author daniel.urban
Recipients daniel.urban, eric.araujo, rhettinger, stutzbach, terry.reedy
Date 2010-07-24.08:03:58
SpamBayes Score 0.000527263
Marked as misclassified No
Message-id <>
> Unless there is a reason I have missed, I would iterate through the
> smaller set, which might even be empty or nearly so, rather than
> either in particular.

You're right, here is a new patch. Pseudocode:

def isdisjoint(self, other):
    if self is other:
        if len(self) == 0:
            return True
            return False
        if len(other) > len(self):
            self, other = other, self
        for item in other:
            if item in self:
                return False
        return True
Date User Action Args
2010-07-24 08:04:02daniel.urbansetrecipients: + daniel.urban, rhettinger, terry.reedy, stutzbach, eric.araujo
2010-07-24 08:04:02daniel.urbansetmessageid: <>
2010-07-24 08:04:00daniel.urbanlinkissue9212 messages
2010-07-24 08:04:00daniel.urbancreate