summaryrefslogtreecommitdiffstats
path: root/Lib/symtable.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2015-04-28 01:44:22 (GMT)
committerBenjamin Peterson <benjamin@python.org>2015-04-28 01:44:22 (GMT)
commit1dfd247c1ba947e99a482eeacfb8cbdecdd45b72 (patch)
tree24aede540fb2fac7e3fe6502f295b9e4d50bd10b /Lib/symtable.py
parent48050cbbe7cc62e76dbd0fdbf391c183f1c2e30a (diff)
downloadcpython-1dfd247c1ba947e99a482eeacfb8cbdecdd45b72.zip
cpython-1dfd247c1ba947e99a482eeacfb8cbdecdd45b72.tar.gz
cpython-1dfd247c1ba947e99a482eeacfb8cbdecdd45b72.tar.bz2
remove the concept of an unoptimized function scope from the compiler, since it can't happen anymore
Diffstat (limited to 'Lib/symtable.py')
-rw-r--r--Lib/symtable.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/Lib/symtable.py b/Lib/symtable.py
index e23313b..84fec4a 100644
--- a/Lib/symtable.py
+++ b/Lib/symtable.py
@@ -2,7 +2,7 @@
import _symtable
from _symtable import (USE, DEF_GLOBAL, DEF_LOCAL, DEF_PARAM,
- DEF_IMPORT, DEF_BOUND, OPT_IMPORT_STAR, SCOPE_OFF, SCOPE_MASK, FREE,
+ DEF_IMPORT, DEF_BOUND, SCOPE_OFF, SCOPE_MASK, FREE,
LOCAL, GLOBAL_IMPLICIT, GLOBAL_EXPLICIT, CELL)
import weakref
@@ -74,8 +74,7 @@ class SymbolTable(object):
return self._table.lineno
def is_optimized(self):
- return bool(self._table.type == _symtable.TYPE_FUNCTION
- and not self._table.optimized)
+ return bool(self._table.type == _symtable.TYPE_FUNCTION)
def is_nested(self):
return bool(self._table.nested)
@@ -87,10 +86,6 @@ class SymbolTable(object):
"""Return true if the scope uses exec. Deprecated method."""
return False
- def has_import_star(self):
- """Return true if the scope uses import *"""
- return bool(self._table.optimized & OPT_IMPORT_STAR)
-
def get_identifiers(self):
return self._table.symbols.keys()