Gave __sub__/difference a factor of 2-5 speed boost.

This commit is contained in:
Tim Peters 2002-08-25 19:50:43 +00:00
parent 334b4a5c39
commit b8940393e9
1 changed files with 2 additions and 1 deletions

View File

@ -223,9 +223,10 @@ class BaseSet(object):
return NotImplemented
result = self.__class__()
data = result._data
otherdata = other._data
value = True
for elt in self:
if elt not in other:
if elt not in otherdata:
data[elt] = value
return result