summaryrefslogtreecommitdiff
path: root/Lib/symtable.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-08-20 01:42:01 +0000
committerBenjamin Peterson <benjamin@python.org>2008-08-20 01:42:01 +0000
commite977ad4d7bda48451c70b72b221c9804b353ceb9 (patch)
tree5fb2d640d3a0d3740e811eb6309d5a8af2a6695d /Lib/symtable.py
parentf647dc10e339e8f5b2a17d7057f4fba958678d72 (diff)
downloadcpython-git-e977ad4d7bda48451c70b72b221c9804b353ceb9.tar.gz
deprecate some useless, noop methods in symtable
Diffstat (limited to 'Lib/symtable.py')
-rw-r--r--Lib/symtable.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/Lib/symtable.py b/Lib/symtable.py
index 66c0e0354c..4a5662d299 100644
--- a/Lib/symtable.py
+++ b/Lib/symtable.py
@@ -2,11 +2,10 @@
import _symtable
from _symtable import (USE, DEF_GLOBAL, DEF_LOCAL, DEF_PARAM,
- DEF_STAR, DEF_DOUBLESTAR, DEF_INTUPLE, DEF_FREE,
- DEF_FREE_GLOBAL, DEF_FREE_CLASS, DEF_IMPORT, DEF_BOUND,
- OPT_IMPORT_STAR, OPT_EXEC, OPT_BARE_EXEC, SCOPE_OFF, SCOPE_MASK,
- FREE, GLOBAL_IMPLICIT, GLOBAL_EXPLICIT)
+ DEF_IMPORT, DEF_BOUND, OPT_IMPORT_STAR, OPT_EXEC, OPT_BARE_EXEC,
+ SCOPE_OFF, SCOPE_MASK, FREE, GLOBAL_IMPLICIT, GLOBAL_EXPLICIT)
+import warnings
import weakref
__all__ = ["symtable", "SymbolTable", "newSymbolTable", "Class",
@@ -194,10 +193,14 @@ class Symbol(object):
return bool(self.__scope in (GLOBAL_IMPLICIT, GLOBAL_EXPLICIT))
def is_vararg(self):
- return bool(self.__flags & DEF_STAR)
+ warnings.warn("is_vararg() is obsolete and will be removed",
+ DeprecationWarning, 2)
+ return False
def is_keywordarg(self):
- return bool(self.__flags & DEF_DOUBLESTAR)
+ warnings.warn("is_keywordarg() is obsolete and will be removed",
+ DeprecationWarning, 2)
+ return False
def is_local(self):
return bool(self.__flags & DEF_BOUND)
@@ -212,7 +215,8 @@ class Symbol(object):
return bool(self.__flags & DEF_LOCAL)
def is_in_tuple(self):
- return bool(self.__flags & DEF_INTUPLE)
+ warnings.warn("is_in_tuple() is obsolete and will be removed",
+ DeprecationWarning, 2)
def is_namespace(self):
"""Returns true if name binding introduces new namespace.