aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-08-20 02:06:00 +0000
committerBenjamin Peterson <benjamin@python.org>2008-08-20 02:06:00 +0000
commit9f9fc68b0fb279e5774d56bcee932d66d02ba369 (patch)
tree952a299913581e04125ff62b83ae8966bf60f456 /Lib/symtable.py
parentkill the obsolete symtable.Symbol methods (diff)
downloadcpython-9f9fc68b0fb279e5774d56bcee932d66d02ba369.tar.gz
cpython-9f9fc68b0fb279e5774d56bcee932d66d02ba369.tar.bz2
cpython-9f9fc68b0fb279e5774d56bcee932d66d02ba369.zip
return sets instead of tuples from some symtable methods
Diffstat (limited to 'Lib/symtable.py')
-rw-r--r--Lib/symtable.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/symtable.py b/Lib/symtable.py
index 3d1775b2f2c..ac9396c4f82 100644
--- a/Lib/symtable.py
+++ b/Lib/symtable.py
@@ -129,8 +129,8 @@ class Function(SymbolTable):
__globals = None
def __idents_matching(self, test_func):
- return tuple([ident for ident in self.get_identifiers()
- if test_func(self._table.symbols[ident])])
+ return frozenset(ident for ident in self.get_identifiers()
+ if test_func(self._table.symbols[ident]))
def get_parameters(self):
if self.__params is None:
@@ -165,7 +165,7 @@ class Class(SymbolTable):
d = {}
for st in self._table.children:
d[st.name] = 1
- self.__methods = tuple(d)
+ self.__methods = frozenset(d)
return self.__methods