Skip to content

Commit e970dc7

Browse files
committed
Issue #15212: fix typo in compiler module (rename SC_GLOBAL_EXPLICT to SC_GLOBAL_EXPLICIT).
Patch by Arfrever.
1 parent e683ef5 commit e970dc7

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

Lib/compiler/consts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
SC_LOCAL = 1
77
SC_GLOBAL_IMPLICIT = 2
8-
SC_GLOBAL_EXPLICT = 3
8+
SC_GLOBAL_EXPLICIT = 3
99
SC_FREE = 4
1010
SC_CELL = 5
1111
SC_UNKNOWN = 6

Lib/compiler/pycodegen.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
from compiler import ast, parse, walk, syntax
99
from compiler import pyassem, misc, future, symbols
10-
from compiler.consts import SC_LOCAL, SC_GLOBAL_IMPLICIT, SC_GLOBAL_EXPLICT, \
10+
from compiler.consts import SC_LOCAL, SC_GLOBAL_IMPLICIT, SC_GLOBAL_EXPLICIT, \
1111
SC_FREE, SC_CELL
1212
from compiler.consts import (CO_VARARGS, CO_VARKEYWORDS, CO_NEWLOCALS,
1313
CO_NESTED, CO_GENERATOR, CO_FUTURE_DIVISION,
@@ -283,7 +283,7 @@ def _nameOp(self, prefix, name):
283283
self.emit(prefix + '_NAME', name)
284284
else:
285285
self.emit(prefix + '_FAST', name)
286-
elif scope == SC_GLOBAL_EXPLICT:
286+
elif scope == SC_GLOBAL_EXPLICIT:
287287
self.emit(prefix + '_GLOBAL', name)
288288
elif scope == SC_GLOBAL_IMPLICIT:
289289
if not self.optimized:

Lib/compiler/symbols.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Module symbol-table generator"""
22

33
from compiler import ast
4-
from compiler.consts import SC_LOCAL, SC_GLOBAL_IMPLICIT, SC_GLOBAL_EXPLICT, \
4+
from compiler.consts import SC_LOCAL, SC_GLOBAL_IMPLICIT, SC_GLOBAL_EXPLICIT, \
55
SC_FREE, SC_CELL, SC_UNKNOWN
66
from compiler.misc import mangle
77
import types
@@ -90,7 +90,7 @@ def check_name(self, name):
9090
The scope of a name could be LOCAL, GLOBAL, FREE, or CELL.
9191
"""
9292
if name in self.globals:
93-
return SC_GLOBAL_EXPLICT
93+
return SC_GLOBAL_EXPLICIT
9494
if name in self.cells:
9595
return SC_CELL
9696
if name in self.defs:

0 commit comments

Comments
 (0)