]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Reduced number of temporary names used at module scope. Use underscores in
authorFred Drake <fdrake@acm.org>
Mon, 6 Oct 1997 21:06:29 +0000 (21:06 +0000)
committerFred Drake <fdrake@acm.org>
Mon, 6 Oct 1997 21:06:29 +0000 (21:06 +0000)
front of temporary names in the module namespace.

Lib/symbol.py

index 4a71968b252d336f0cc691b802ed5d375c8f1622..678e9efae204f66d15a81bb07dd5b69a83ccb1b1 100755 (executable)
@@ -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():