new exec syntax

This commit is contained in:
Guido van Rossum 1995-09-18 22:00:37 +00:00
parent aada0d51a5
commit dc3372e943
2 changed files with 6 additions and 6 deletions

View File

@ -130,7 +130,7 @@ def assign_members(target, attrlist, exclist, prefix):
stmt = lhs + '=' + `value`
if debug: print 'exec', stmt
try:
exec(stmt + '\n')
exec stmt + '\n'
except KeyboardInterrupt: # Don't catch this!
raise KeyboardInterrupt
except:
@ -186,7 +186,7 @@ def build_subactuators(panel, super_act, al):
if name:
stmt = 'panel.' + name + ' = act'
if debug: print 'exec', stmt
exec(stmt + '\n')
exec stmt + '\n'
if is_endgroup(a):
panel.endgroup()
sub_al = getattrlist(a, 'al')
@ -236,7 +236,7 @@ def build_panel(descr):
act.addact(panel)
if name:
stmt = 'panel.' + name + ' = act'
exec(stmt + '\n')
exec stmt + '\n'
if is_endgroup(a):
panel.endgroup()
sub_al = getattrlist(a, 'al')

View File

@ -130,7 +130,7 @@ def assign_members(target, attrlist, exclist, prefix):
stmt = lhs + '=' + `value`
if debug: print 'exec', stmt
try:
exec(stmt + '\n')
exec stmt + '\n'
except KeyboardInterrupt: # Don't catch this!
raise KeyboardInterrupt
except:
@ -186,7 +186,7 @@ def build_subactuators(panel, super_act, al):
if name:
stmt = 'panel.' + name + ' = act'
if debug: print 'exec', stmt
exec(stmt + '\n')
exec stmt + '\n'
if is_endgroup(a):
panel.endgroup()
sub_al = getattrlist(a, 'al')
@ -236,7 +236,7 @@ def build_panel(descr):
act.addact(panel)
if name:
stmt = 'panel.' + name + ' = act'
exec(stmt + '\n')
exec stmt + '\n'
if is_endgroup(a):
panel.endgroup()
sub_al = getattrlist(a, 'al')