mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
#2498 modernized try, except, finally statements in bdb
This commit is contained in:
parent
69b747b735
commit
41cf50d613
1 changed files with 9 additions and 12 deletions
|
|
@ -361,7 +361,6 @@ class Bdb:
|
|||
sys.settrace(self.trace_dispatch)
|
||||
if not isinstance(cmd, types.CodeType):
|
||||
cmd = cmd+'\n'
|
||||
try:
|
||||
try:
|
||||
exec cmd in globals, locals
|
||||
except BdbQuit:
|
||||
|
|
@ -380,7 +379,6 @@ class Bdb:
|
|||
sys.settrace(self.trace_dispatch)
|
||||
if not isinstance(expr, types.CodeType):
|
||||
expr = expr+'\n'
|
||||
try:
|
||||
try:
|
||||
return eval(expr, globals, locals)
|
||||
except BdbQuit:
|
||||
|
|
@ -399,7 +397,6 @@ class Bdb:
|
|||
self.reset()
|
||||
sys.settrace(self.trace_dispatch)
|
||||
res = None
|
||||
try:
|
||||
try:
|
||||
res = func(*args, **kwds)
|
||||
except BdbQuit:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue