diff options
author | Guido van Rossum <guido@python.org> | 1993-12-17 15:25:27 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1993-12-17 15:25:27 (GMT) |
commit | 7bc817d5ba917528e8bd07ec461c635291e7b06a (patch) | |
tree | d244fa2c8a15248efe095823be9f5e690a2efe38 /Lib/stdwin/wdb.py | |
parent | aa14837bd00c28997dbde4014f8c994b9482def1 (diff) | |
download | cpython-7bc817d5ba917528e8bd07ec461c635291e7b06a.zip cpython-7bc817d5ba917528e8bd07ec461c635291e7b06a.tar.gz cpython-7bc817d5ba917528e8bd07ec461c635291e7b06a.tar.bz2 |
* Mass change: get rid of all init() methods, in favor of __init__()
constructors. There is no backward compatibility. Not everything has
been tested.
* aiff.{py,doc}: deleted in favor of aifc.py (which contains its docs as
comments)
Diffstat (limited to 'Lib/stdwin/wdb.py')
-rwxr-xr-x | Lib/stdwin/wdb.py | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/Lib/stdwin/wdb.py b/Lib/stdwin/wdb.py index c499296..d5c28bb 100755 --- a/Lib/stdwin/wdb.py +++ b/Lib/stdwin/wdb.py @@ -19,16 +19,15 @@ WdbDone = 'wdb.WdbDone' # Exception to continue execution class Wdb(bdb.Bdb, basewin.BaseWindow): # Window debugger - def init(self): + def __init__(self): self.sourcewindows = {} self.framewindows = {} - self = bdb.Bdb.init(self) + bdb.Bdb.__init__(self) width = WIDTH*stdwin.textwidth('0') height = HEIGHT*stdwin.lineheight() stdwin.setdefwinsize(width, height) - self = basewin.BaseWindow.init(self, '--Stack--') + basewin.BaseWindow.__init__(self, '--Stack--') self.closed = 0 - return self def reset(self): if self.closed: raise RuntimeError, 'already closed' @@ -151,9 +150,8 @@ class Wdb(bdb.Bdb, basewin.BaseWindow): # Window debugger if not self.sourcewindows.has_key(fn): import wdbsrcwin try: - self.sourcewindows[fn] = \ - wdbsrcwin.DebuggerSourceWindow(). \ - init(self, fn) + self.sourcewindows[fn] = wdbsrcwin. \ + DebuggerSourceWindow(self, fn) except IOError: stdwin.fleep() return @@ -170,7 +168,7 @@ class Wdb(bdb.Bdb, basewin.BaseWindow): # Window debugger else: import wdbframewin self.framewindows[name] = \ - wdbframewin.FrameWindow().init(self, \ + wdbframewin.FrameWindow(self, \ self.curframe, \ self.curframe.f_locals, name) do_f = do_frame @@ -182,7 +180,7 @@ class Wdb(bdb.Bdb, basewin.BaseWindow): # Window debugger else: import wdbframewin self.framewindows[name] = \ - wdbframewin.FrameWindow().init(self, \ + wdbframewin.FrameWindow(self, \ self.curframe, \ self.curframe.f_globals, name) do_g = do_globalframe @@ -274,27 +272,27 @@ class Wdb(bdb.Bdb, basewin.BaseWindow): # Window debugger # Simplified interface def run(statement): - x = Wdb().init() + x = Wdb() try: x.run(statement) finally: x.close() def runctx(statement, globals, locals): - x = Wdb().init() + x = Wdb() try: x.runctx(statement, globals, locals) finally: x.close() def runcall(*args): - x = Wdb().init() - try: apply(Pdb().init().runcall, args) + x = Wdb() + try: apply(x.runcall, args) finally: x.close() # Post-Mortem interface def post_mortem(traceback): - p = Pdb().init() - p.reset() - p.interaction(None, traceback) + x = Wdb() + x.reset() + x.interaction(None, traceback) def pm(): import sys |