[Python-Dev] nested scopes and future status

Jeremy Hylton jeremy@alum.mit.edu
Thu, 1 Mar 2001 18:34:44 -0500 (EST)


There are several loose ends in the nested scopes changes that I won't
have time to fix before the beta.  Here's a laundry list of tasks that
remain.  I don't think any of these is crucial for the release.
Holler if there's something you'd like me to fix tonight.

- Integrate the parsing of future statements into the _symtable
  module's interface.  This interface is new with 2.1 and
  undocumented, so it's deficiency here will not affect any code.

- Update traceback.py to understand SyntaxErrors that have a text
  attribute and an offset of None.  It should not print the caret.

- PyErr_ProgramText() should be called when an exception is printed
  rather than when it is raised.

- Fix pdb to support nested scopes.

- Produce a better error message/warning for code like this:
  def f(x):
      def g():
          exec ...
          print x
  The warning message should say that exec is not allowed in a nested
  function with free variables.  It currently says that g *contains* a
  nested function with free variables.

- Update the documentation.

Jeremy