1. 19 May, 2004 1 kayıt (commit)
    • Raymond Hettinger's avatar
      SF patch #872326: Generator expression implementation · 354433a5
      Raymond Hettinger yazdı
      (Code contributed by Jiwon Seo.)
      
      The documentation portion of the patch is being re-worked and will be
      checked-in soon.  Likewise, PEP 289 will be updated to reflect Guido's
      rationale for the design decisions on binding behavior (as described in
      in his patch comments and in discussions on python-dev).
      
      The test file, test_genexps.py, is written in doctest format and is
      meant to exercise all aspects of the the patch.  Further additions are
      welcome from everyone.  Please stress test this new feature as much as
      possible before the alpha release.
      354433a5
  2. 21 May, 2003 1 kayıt (commit)
  3. 11 Ara, 2002 1 kayıt (commit)
  4. 12 Agu, 2002 1 kayıt (commit)
  5. 11 Agu, 2001 1 kayıt (commit)
  6. 18 Haz, 2001 1 kayıt (commit)
  7. 22 Mar, 2001 1 kayıt (commit)
  8. 28 Şub, 2001 1 kayıt (commit)
  9. 27 Şub, 2001 2 kayıt (commit)
    • Jeremy Hylton's avatar
      Improved __future__ parser; still more to do · 4db62b1e
      Jeremy Hylton yazdı
      Makefile.pre.in: add target future.o
      
      Include/compile.h: define PyFutureFeaters and PyNode_Future()
                         add c_future slot to struct compiling
      
      Include/symtable.h: add st_future slot to struct symtable
      
      Python/future.c: implementation of PyNode_Future()
      
      Python/compile.c: use PyNode_Future() for nested_scopes support
      
      Python/symtable.c: include compile.h to pick up PyFutureFeatures decl
      4db62b1e
    • Jeremy Hylton's avatar
      Preliminary support for future nested scopes · 29906eef
      Jeremy Hylton yazdı
      compile.h: #define NESTED_SCOPES_DEFAULT 0 for Python 2.1
                 __future__ feature name: "nested_scopes"
      
      symtable.h: Add st_nested_scopes slot.  Define flags to track exec and
          import star.
      
      Lib/test/test_scope.py: requires nested scopes
      
      compile.c: Fiddle with error messages.
      
          Reverse the sense of ste_optimized flag on
          PySymtableEntryObjects.  If it is true, there is an optimization
          conflict.
      
          Modify get_ref_type to respect st_nested_scopes flags.
      
          Refactor symtable_load_symbols() into several smaller functions,
          which use struct symbol_info to share variables.  In new function
          symtable_update_flags(), raise an error or warning for import * or
          bare exec that conflicts with nested scopes.  Also, modify handle
          for free variables to respect st_nested_scopes flag.
      
          In symtable_init() assign st_nested_scopes flag to
          NESTED_SCOPES_DEFAULT (defined in compile.h).
      
          Add preliminary and often incorrect implementation of
          symtable_check_future().
      
          Add symtable_lookup() helper for future use.
      29906eef
  10. 09 Şub, 2001 1 kayıt (commit)
    • Jeremy Hylton's avatar
      Relax the rules for using 'from ... import *' and exec in the presence · cb17ae8b
      Jeremy Hylton yazdı
      of nested functions.  Either is allowed in a function if it contains
      no defs or lambdas or the defs and lambdas it contains have no free
      variables.  If a function is itself nested and has free variables,
      either is illegal.
      
      Revise the symtable to use a PySymtableEntryObject, which holds all
      the revelent information for a scope, rather than using a bunch of
      st_cur_XXX pointers in the symtable struct.  The changes simplify the
      internal management of the current symtable scope and of the stack.
      
      Added new C source file: Python/symtable.c.  (Does the Windows build
      process need to be updated?)
      
      As part of these changes, the initial _symtable module interface
      introduced in 2.1a2 is replaced.  A dictionary of
      PySymtableEntryObjects are returned.
      cb17ae8b
  11. 02 Şub, 2001 2 kayıt (commit)
    • Jeremy Hylton's avatar
      Fix symbol table pass to generation SyntaxError exceptions that · 5acc0c0c
      Jeremy Hylton yazdı
      include the filename and line number.
      5acc0c0c
    • Jeremy Hylton's avatar
      Move a bunch of definitions that were internal to compile.c to · 4b38da66
      Jeremy Hylton yazdı
      symtable.h, so that they can be used by external module.
      
      Improve error handling in symtable_enter_scope(), which return an
      error code that went unchecked by most callers. XXX The error handling
      in symtable code is sloppy in general.
      
      Modify symtable to record the line number that begins each scope.
      This can help to identify which code block is being referred to when
      multiple blocks are bound to the same name.
      
      Add st_scopes dict that is used to preserve scope info when
      PyNode_CompileSymtable() is called.  Otherwise, this information is
      tossed as soon as it is no longer needed.
      
      Add Py_SymtableString() to pythonrun; analogous to Py_CompileString().
      4b38da66