@@ -168,7 +168,7 @@ def user_exception(self, frame, exc_info):
168
168
def _set_stopinfo (self , stopframe , returnframe , stoplineno = 0 ):
169
169
self .stopframe = stopframe
170
170
self .returnframe = returnframe
171
- self .quitting = 0
171
+ self .quitting = False
172
172
# stoplineno >= 0 means: stop at line >= the stoplineno
173
173
# stoplineno -1 means: don't stop at all
174
174
self .stoplineno = stoplineno
@@ -225,7 +225,7 @@ def set_continue(self):
225
225
def set_quit (self ):
226
226
self .stopframe = self .botframe
227
227
self .returnframe = None
228
- self .quitting = 1
228
+ self .quitting = True
229
229
sys .settrace (None )
230
230
231
231
# Derived classes and clients can call the following methods
@@ -235,7 +235,7 @@ def set_quit(self):
235
235
# Call self.get_*break*() to see the breakpoints or better
236
236
# for bp in Breakpoint.bpbynumber: if bp: bp.bpprint().
237
237
238
- def set_break (self , filename , lineno , temporary = 0 , cond = None ,
238
+ def set_break (self , filename , lineno , temporary = False , cond = None ,
239
239
funcname = None ):
240
240
filename = self .canonic (filename )
241
241
import linecache # Import as late as possible
@@ -391,7 +391,7 @@ def run(self, cmd, globals=None, locals=None):
391
391
except BdbQuit :
392
392
pass
393
393
finally :
394
- self .quitting = 1
394
+ self .quitting = True
395
395
sys .settrace (None )
396
396
397
397
def runeval (self , expr , globals = None , locals = None ):
@@ -407,7 +407,7 @@ def runeval(self, expr, globals=None, locals=None):
407
407
except BdbQuit :
408
408
pass
409
409
finally :
410
- self .quitting = 1
410
+ self .quitting = True
411
411
sys .settrace (None )
412
412
413
413
def runctx (self , cmd , globals , locals ):
@@ -425,7 +425,7 @@ def runcall(self, func, *args, **kwds):
425
425
except BdbQuit :
426
426
pass
427
427
finally :
428
- self .quitting = 1
428
+ self .quitting = True
429
429
sys .settrace (None )
430
430
return res
431
431
@@ -457,19 +457,19 @@ class Breakpoint:
457
457
# index 0 is unused, except for marking an
458
458
# effective break .... see effective()
459
459
460
- def __init__ (self , file , line , temporary = 0 , cond = None , funcname = None ):
460
+ def __init__ (self , file , line , temporary = False , cond = None , funcname = None ):
461
461
self .funcname = funcname
462
462
# Needed if funcname is not None.
463
463
self .func_first_executable_line = None
464
464
self .file = file # This better be in canonical form!
465
465
self .line = line
466
466
self .temporary = temporary
467
467
self .cond = cond
468
- self .enabled = 1
468
+ self .enabled = True
469
469
self .ignore = 0
470
470
self .hits = 0
471
471
self .number = Breakpoint .next
472
- Breakpoint .next = Breakpoint . next + 1
472
+ Breakpoint .next += 1
473
473
# Build the two lists
474
474
self .bpbynumber .append (self )
475
475
if (file , line ) in self .bplist :
@@ -486,10 +486,10 @@ def deleteMe(self):
486
486
del self .bplist [index ]
487
487
488
488
def enable (self ):
489
- self .enabled = 1
489
+ self .enabled = True
490
490
491
491
def disable (self ):
492
- self .enabled = 0
492
+ self .enabled = False
493
493
494
494
def bpprint (self , out = None ):
495
495
if out is None :
0 commit comments