summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/symtable.py11
-rw-r--r--Lib/test/test_parser.py1
2 files changed, 6 insertions, 6 deletions
diff --git a/Lib/symtable.py b/Lib/symtable.py
index ac9396c..9387a67 100644
--- a/Lib/symtable.py
+++ b/Lib/symtable.py
@@ -8,15 +8,14 @@ from _symtable import (USE, DEF_GLOBAL, DEF_LOCAL, DEF_PARAM,
import weakref
-__all__ = ["symtable", "SymbolTable", "newSymbolTable", "Class",
- "Function", "Symbol"]
+__all__ = ["symtable", "SymbolTable", "Class", "Function", "Symbol"]
def symtable(code, filename, compile_type):
raw = _symtable.symtable(code, filename, compile_type)
for top in raw.values():
if top.name == 'top':
break
- return newSymbolTable(top, filename)
+ return _newSymbolTable(top, filename)
class SymbolTableFactory:
def __init__(self):
@@ -36,7 +35,7 @@ class SymbolTableFactory:
obj = self.__memo[key] = self.new(table, filename)
return obj
-newSymbolTable = SymbolTableFactory()
+_newSymbolTable = SymbolTableFactory()
class SymbolTable(object):
@@ -111,12 +110,12 @@ class SymbolTable(object):
return [self.lookup(ident) for ident in self.get_identifiers()]
def __check_children(self, name):
- return [newSymbolTable(st, self._filename)
+ return [_newSymbolTable(st, self._filename)
for st in self._table.children
if st.name == name]
def get_children(self):
- return [newSymbolTable(st, self._filename)
+ return [_newSymbolTable(st, self._filename)
for st in self._table.children]
diff --git a/Lib/test/test_parser.py b/Lib/test/test_parser.py
index e417962..c1a22ae 100644
--- a/Lib/test/test_parser.py
+++ b/Lib/test/test_parser.py
@@ -66,6 +66,7 @@ class RoundtripLegalSyntaxTestCase(unittest.TestCase):
self.check_expr("foo(a, b, c, *args)")
self.check_expr("foo(a, b, c, *args, **kw)")
self.check_expr("foo(a, b, c, **kw)")
+ self.check_expr("foo(a, *args, keyword=23)")
self.check_expr("foo + bar")
self.check_expr("foo - bar")
self.check_expr("foo * bar")