mirror of
https://github.com/python/cpython.git
synced 2024-11-26 19:34:19 +08:00
change name of Set method: items -> elements (avoids confusion with
dict)
This commit is contained in:
parent
dee86c644e
commit
e4d6293383
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user