Added __len__ to set.

This commit is contained in:
Jeremy Fincher 2003-04-04 06:15:34 +00:00
parent ea787b8441
commit 20032a089a

View File

@ -120,6 +120,9 @@ class set(object):
for x in t: for x in t:
self.d[x] = None self.d[x] = None
def __len__(self):
return len(self.d)
def add(self, x): def add(self, x):
self.d[x] = None self.d[x] = None