File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313
1414class Bdb : # Basic Debugger
1515
16- def init (self ):
16+ def __init__ (self ):
1717 self .breaks = {}
18+
19+ def init (self ): # BW compat only
1820 return self
1921
2022 def reset (self ):
@@ -303,5 +305,5 @@ def bar(a):
303305def test ():
304306 import linecache
305307 linecache .checkcache ()
306- t = Tdb (). init ()
308+ t = Tdb ()
307309 t .run ('import bdb; bdb.foo(10)' )
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ def __init__(self):
1414 self .identchars = IDENTCHARS
1515 self .lastcmd = ''
1616
17- def init (self ):
17+ def init (self ): # BW compat only
1818 return self
1919
2020 def cmdloop (self ):
Original file line number Diff line number Diff line change 1212
1313class Pdb (bdb .Bdb , cmd .Cmd ):
1414
15- def init (self ):
16- self = bdb .Bdb .init (self )
17- self = cmd .Cmd .init (self )
15+ def __init__ (self ):
16+ bdb .Bdb .__init__ (self )
17+ cmd .Cmd .__init__ (self )
1818 self .prompt = '(Pdb) '
19+
20+ def init (self ): # BW compat only
1921 return self
2022
2123 def reset (self ):
@@ -277,19 +279,19 @@ def print_stack_entry(self, frame_lineno):
277279# Simplified interface
278280
279281def run (statement ):
280- Pdb ().init (). run (statement )
282+ Pdb ().run (statement )
281283
282284def runctx (statement , globals , locals ):
283- Pdb ().init (). runctx (statement , globals , locals )
285+ Pdb ().runctx (statement , globals , locals )
284286
285287def runcall (* args ):
286- apply (Pdb ().init (). runcall , args )
288+ apply (Pdb ().runcall , args )
287289
288290
289291# Post-Mortem interface
290292
291293def post_mortem (t ):
292- p = Pdb (). init ()
294+ p = Pdb ()
293295 p .reset ()
294296 while t .tb_next <> None : t = t .tb_next
295297 p .interaction (t .tb_frame , t )
You can’t perform that action at this time.
0 commit comments