Changeset 391 for python/trunk/Lib/compiler/symbols.py
- Timestamp:
- Mar 19, 2014, 11:31:01 PM (11 years ago)
- Location:
- python/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/trunk
-
Property svn:mergeinfo
set to
/python/vendor/Python-2.7.6 merged eligible /python/vendor/current merged eligible
-
Property svn:mergeinfo
set to
-
python/trunk/Lib/compiler/symbols.py
r2 r391 2 2 3 3 from compiler import ast 4 from compiler.consts import SC_LOCAL, SC_GLOBAL, SC_FREE, SC_CELL, SC_UNKNOWN 4 from compiler.consts import SC_LOCAL, SC_GLOBAL_IMPLICIT, SC_GLOBAL_EXPLICIT, \ 5 SC_FREE, SC_CELL, SC_UNKNOWN 5 6 from compiler.misc import mangle 6 7 import types … … 90 91 """ 91 92 if name in self.globals: 92 return SC_GLOBAL 93 return SC_GLOBAL_EXPLICIT 93 94 if name in self.cells: 94 95 return SC_CELL … … 100 101 return SC_UNKNOWN 101 102 else: 102 return SC_GLOBAL 103 return SC_GLOBAL_IMPLICIT 103 104 104 105 def get_free_vars(self): … … 153 154 or isinstance(self, ClassScope): 154 155 self.frees[name] = 1 155 elif sc == SC_GLOBAL :156 elif sc == SC_GLOBAL_IMPLICIT: 156 157 child_globals.append(name) 157 158 elif isinstance(self, FunctionScope) and sc == SC_LOCAL:
Note:
See TracChangeset
for help on using the changeset viewer.