Ignore:
Timestamp:
Mar 19, 2014, 11:31:01 PM (11 years ago)
Author:
dmik
Message:

python: Merge vendor 2.7.6 to trunk.

Location:
python/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • python/trunk

  • python/trunk/Lib/compiler/symbols.py

    r2 r391  
    22
    33from compiler import ast
    4 from compiler.consts import SC_LOCAL, SC_GLOBAL, SC_FREE, SC_CELL, SC_UNKNOWN
     4from compiler.consts import SC_LOCAL, SC_GLOBAL_IMPLICIT, SC_GLOBAL_EXPLICIT, \
     5    SC_FREE, SC_CELL, SC_UNKNOWN
    56from compiler.misc import mangle
    67import types
     
    9091        """
    9192        if name in self.globals:
    92             return SC_GLOBAL
     93            return SC_GLOBAL_EXPLICIT
    9394        if name in self.cells:
    9495            return SC_CELL
     
    100101            return SC_UNKNOWN
    101102        else:
    102             return SC_GLOBAL
     103            return SC_GLOBAL_IMPLICIT
    103104
    104105    def get_free_vars(self):
     
    153154                   or isinstance(self, ClassScope):
    154155                    self.frees[name] = 1
    155                 elif sc == SC_GLOBAL:
     156                elif sc == SC_GLOBAL_IMPLICIT:
    156157                    child_globals.append(name)
    157158                elif isinstance(self, FunctionScope) and sc == SC_LOCAL:
Note: See TracChangeset for help on using the changeset viewer.