summaryrefslogtreecommitdiffstats
path: root/Lib/symtable.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-08-20 02:06:00 (GMT)
committerBenjamin Peterson <benjamin@python.org>2008-08-20 02:06:00 (GMT)
commit9f9fc68b0fb279e5774d56bcee932d66d02ba369 (patch)
tree952a299913581e04125ff62b83ae8966bf60f456 /Lib/symtable.py
parent87069fd8fe8fae7409f313bd02faa65e9110ef66 (diff)
downloadcpython-9f9fc68b0fb279e5774d56bcee932d66d02ba369.zip
cpython-9f9fc68b0fb279e5774d56bcee932d66d02ba369.tar.gz
cpython-9f9fc68b0fb279e5774d56bcee932d66d02ba369.tar.bz2
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 3d1775b..ac9396c 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