summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>1997-10-06 21:06:29 (GMT)
committerFred Drake <fdrake@acm.org>1997-10-06 21:06:29 (GMT)
commitdc1a072e02096480520020f0fa37f4d5995a8b43 (patch)
tree3653c46cf7d1b64ef1a6af63bbf77463fecc7675 /Lib
parent1f83ccee88c9f0b9f3fdc5f025e538e41c0cb5a3 (diff)
downloadcpython-dc1a072e02096480520020f0fa37f4d5995a8b43.zip
cpython-dc1a072e02096480520020f0fa37f4d5995a8b43.tar.gz
cpython-dc1a072e02096480520020f0fa37f4d5995a8b43.tar.bz2
Reduced number of temporary names used at module scope. Use underscores in
front of temporary names in the module namespace.
Diffstat (limited to 'Lib')
-rwxr-xr-xLib/symbol.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/Lib/symbol.py b/Lib/symbol.py
index 4a71968..678e9ef 100755
--- a/Lib/symbol.py
+++ b/Lib/symbol.py
@@ -72,12 +72,10 @@ arglist = 311
argument = 312
#--end constants--
-names = dir()
sym_name = {}
-for name in names:
- number = eval(name)
- if type(number) is type(0):
- sym_name[number] = name
+for _name, _value in globals().items():
+ if type(_value) is type(0):
+ sym_name[_value] = _name
def main():