mirror of https://github.com/python/cpython.git
change name of Set method: items -> elements (avoids confusion with
dict)
This commit is contained in:
parent
dee86c644e
commit
e4d6293383
|
@ -16,7 +16,7 @@ def __len__(self):
|
||||||
return len(self.elts)
|
return len(self.elts)
|
||||||
def add(self, elt):
|
def add(self, elt):
|
||||||
self.elts[elt] = elt
|
self.elts[elt] = elt
|
||||||
def items(self):
|
def elements(self):
|
||||||
return self.elts.keys()
|
return self.elts.keys()
|
||||||
def has_elt(self, elt):
|
def has_elt(self, elt):
|
||||||
return self.elts.has_key(elt)
|
return self.elts.has_key(elt)
|
||||||
|
|
|
@ -16,7 +16,7 @@ def __len__(self):
|
||||||
return len(self.elts)
|
return len(self.elts)
|
||||||
def add(self, elt):
|
def add(self, elt):
|
||||||
self.elts[elt] = elt
|
self.elts[elt] = elt
|
||||||
def items(self):
|
def elements(self):
|
||||||
return self.elts.keys()
|
return self.elts.keys()
|
||||||
def has_elt(self, elt):
|
def has_elt(self, elt):
|
||||||
return self.elts.has_key(elt)
|
return self.elts.has_key(elt)
|
||||||
|
|
Loading…
Reference in New Issue