Commit Graph

13 Commits

Author SHA1 Message Date
Jeremy Hylton cfb3d33c24 Merged revisions 70801,70809 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70801 | jeremy.hylton | 2009-03-31 09:17:03 -0400 (Tue, 31 Mar 2009) | 3 lines

  Add is_declared_global() which distinguishes between implicit and
  explicit global variables.
........
  r70809 | jeremy.hylton | 2009-03-31 09:48:15 -0400 (Tue, 31 Mar 2009) | 14 lines

  Global statements from one function leaked into parallel functions.

  Re http://bugs.python.org/issue4315

  The symbol table used the same name dictionaries to recursively
  analyze each of its child blocks, even though the dictionaries are
  modified during analysis.  The fix is to create new temporary
  dictionaries via the analyze_child_block().  The only information that
  needs to propagate back up is the names of the free variables.

  Add more comments and break out a helper function.  This code doesn't
  get any easier to understand when you only look at it once a year.
........
2009-03-31 14:30:05 +00:00
Benjamin Peterson e6b5ba621f fix silly errors of mine 2008-08-20 02:15:42 +00:00
Benjamin Peterson 86da890a9e newSymbolTable is not public API 2008-08-20 01:44:45 +00:00
Benjamin Peterson e977ad4d7b deprecate some useless, noop methods in symtable 2008-08-20 01:42:01 +00:00
Benjamin Peterson 7dd854725b get the symtable module back in working order
- Fix broken functions
- Add (hopefully) extensive tests
- Modernize a little
2008-08-17 17:13:26 +00:00
Neal Norwitz 21d19f7203 Get symtable to limp along, can run compiler/symbols.py. Not saying much, needs more work. 2005-11-25 03:14:00 +00:00
Raymond Hettinger e0d4972acc Replaced .keys() with dictionary iterators 2002-06-02 18:55:56 +00:00
Tim Peters bc0e910826 Convert a pile of obvious "yes/no" functions to return bool. 2002-04-04 22:55:58 +00:00
Tim Peters c4889c496a Remove now-unnecessary "from __future__ import nested_scopes" stmts. 2001-07-12 22:36:02 +00:00
Jeremy Hylton 5030cf1c2d Fix three PyChecker-detected gotchas.
Import OPT_ symbols from _symtable.
Define has_exec() and has_import_star().
2001-04-16 18:43:18 +00:00
Tim Peters a19a168ccc Whitespace normalization. 2001-03-29 04:36:09 +00:00
Jeremy Hylton 101651c128 flesh out __all__
remove debugging code in if __debug__:

add get_children() method on SymbolTable
2001-03-23 15:41:14 +00:00
Jeremy Hylton 816e149c85 First cut at a high-level symbol table interface 2001-03-22 23:32:22 +00:00