change name of Set method: items -> elements (avoids confusion with

dict)
This commit is contained in:
Jeremy Hylton 2000-03-16 20:02:38 +00:00
parent dee86c644e
commit e4d6293383
2 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@ class Set:
return len(self.elts)
def add(self, elt):
self.elts[elt] = elt
def items(self):
def elements(self):
return self.elts.keys()
def has_elt(self, elt):
return self.elts.has_key(elt)

View File

@ -16,7 +16,7 @@ class Set:
return len(self.elts)
def add(self, elt):
self.elts[elt] = elt
def items(self):
def elements(self):
return self.elts.keys()
def has_elt(self, elt):
return self.elts.has_key(elt)