]> granicus.if.org Git - python/commitdiff
Issue #15212: fix typo in compiler module (rename SC_GLOBAL_EXPLICT to SC_GLOBAL_EXPL...
authorAntoine Pitrou <solipsis@pitrou.net>
Sun, 1 Jul 2012 22:01:22 +0000 (00:01 +0200)
committerAntoine Pitrou <solipsis@pitrou.net>
Sun, 1 Jul 2012 22:01:22 +0000 (00:01 +0200)
Patch by Arfrever.

Lib/compiler/consts.py
Lib/compiler/pycodegen.py
Lib/compiler/symbols.py

index 022f6daa4c70b43803775a0103c7341883478a74..c60b1d0b4f6ffc5339459ae58e5e01f888a92eae 100644 (file)
@@ -5,7 +5,7 @@ OP_APPLY = 'OP_APPLY'
 
 SC_LOCAL = 1
 SC_GLOBAL_IMPLICIT = 2
-SC_GLOBAL_EXPLICT = 3
+SC_GLOBAL_EXPLICIT = 3
 SC_FREE = 4
 SC_CELL = 5
 SC_UNKNOWN = 6
index 4f2ecf2ae87f2d5974a1789a7c41bc3d0e39fd3a..6515945f39a3e3b658e9c17d9c1e9ed3664e745c 100644 (file)
@@ -7,7 +7,7 @@ from cStringIO import StringIO
 
 from compiler import ast, parse, walk, syntax
 from compiler import pyassem, misc, future, symbols
-from compiler.consts import SC_LOCAL, SC_GLOBAL_IMPLICIT, SC_GLOBAL_EXPLICT, \
+from compiler.consts import SC_LOCAL, SC_GLOBAL_IMPLICIT, SC_GLOBAL_EXPLICIT, \
      SC_FREE, SC_CELL
 from compiler.consts import (CO_VARARGS, CO_VARKEYWORDS, CO_NEWLOCALS,
      CO_NESTED, CO_GENERATOR, CO_FUTURE_DIVISION,
@@ -283,7 +283,7 @@ class CodeGenerator:
                 self.emit(prefix + '_NAME', name)
             else:
                 self.emit(prefix + '_FAST', name)
-        elif scope == SC_GLOBAL_EXPLICT:
+        elif scope == SC_GLOBAL_EXPLICIT:
             self.emit(prefix + '_GLOBAL', name)
         elif scope == SC_GLOBAL_IMPLICIT:
             if not self.optimized:
index 0bbdc7122d89bdb48d900b133676c822b1f328ae..afeec501538fd652f78b6fcb6ec24c34bad62aa8 100644 (file)
@@ -1,7 +1,7 @@
 """Module symbol-table generator"""
 
 from compiler import ast
-from compiler.consts import SC_LOCAL, SC_GLOBAL_IMPLICIT, SC_GLOBAL_EXPLICT, \
+from compiler.consts import SC_LOCAL, SC_GLOBAL_IMPLICIT, SC_GLOBAL_EXPLICIT, \
     SC_FREE, SC_CELL, SC_UNKNOWN
 from compiler.misc import mangle
 import types
@@ -90,7 +90,7 @@ class Scope:
         The scope of a name could be LOCAL, GLOBAL, FREE, or CELL.
         """
         if name in self.globals:
-            return SC_GLOBAL_EXPLICT
+            return SC_GLOBAL_EXPLICIT
         if name in self.cells:
             return SC_CELL
         if name in self.defs: