[Python-3000-checkins] r65899 - in python/branches/py3k: Lib/symtable.py Lib/test/test_parser.py

benjamin.peterson python-3000-checkins at python.org
Wed Aug 20 04:33:00 CEST 2008


Author: benjamin.peterson
Date: Wed Aug 20 04:33:00 2008
New Revision: 65899

Log:
Merged revisions 65885,65892,65894,65898 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r65885 | benjamin.peterson | 2008-08-19 17:06:11 -0500 (Tue, 19 Aug 2008) | 1 line
  
  check that the parser module can handle the new keyword syntax
........
  r65892 | benjamin.peterson | 2008-08-19 20:27:30 -0500 (Tue, 19 Aug 2008) | 1 line
  
  add a NEWS note for new args syntax
........
  r65894 | benjamin.peterson | 2008-08-19 20:44:45 -0500 (Tue, 19 Aug 2008) | 2 lines
  
  newSymbolTable is not public API
........
  r65898 | benjamin.peterson | 2008-08-19 21:15:42 -0500 (Tue, 19 Aug 2008) | 1 line
  
  fix silly errors of mine
........


Modified:
   python/branches/py3k/   (props changed)
   python/branches/py3k/Lib/symtable.py
   python/branches/py3k/Lib/test/test_parser.py

Modified: python/branches/py3k/Lib/symtable.py
==============================================================================
--- python/branches/py3k/Lib/symtable.py	(original)
+++ python/branches/py3k/Lib/symtable.py	Wed Aug 20 04:33:00 2008
@@ -8,15 +8,14 @@
 
 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 @@
             obj = self.__memo[key] = self.new(table, filename)
         return obj
 
-newSymbolTable = SymbolTableFactory()
+_newSymbolTable = SymbolTableFactory()
 
 
 class SymbolTable(object):
@@ -111,12 +110,12 @@
         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]
 
 

Modified: python/branches/py3k/Lib/test/test_parser.py
==============================================================================
--- python/branches/py3k/Lib/test/test_parser.py	(original)
+++ python/branches/py3k/Lib/test/test_parser.py	Wed Aug 20 04:33:00 2008
@@ -66,6 +66,7 @@
         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")


More information about the Python-3000-checkins mailing list