homepage

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.0005272628
Marked as misclassified No
Message-id <1279958642.41.0.26316375838.issue9212@psf.upfronthosting.co.za>
In-reply-to
Content
> 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
 else:
 return False
 else:
 if len(other) > len(self):
 self, other = other, self
 for item in other:
 if item in self:
 return False
 return True
History
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: <1279958642.41.0.26316375838.issue9212@psf.upfronthosting.co.za>
2010年07月24日 08:04:00daniel.urbanlinkissue9212 messages
2010年07月24日 08:04:00daniel.urbancreate

AltStyle によって変換されたページ (->オリジナル) /