From: Guido van Rossum Date: Thu, 26 Dec 1991 13:03:52 +0000 (+0000) Subject: Use ImportError. X-Git-Tag: v0.9.8~659 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2234bc91013622812dee0a5a58475170d89c512d;p=thirdparty%2FPython%2Fcpython.git Use ImportError. New class syntax. --- diff --git a/Lib/lib-stdwin/formatter.py b/Lib/lib-stdwin/formatter.py index d1cd155804be..aea7deb6e5e7 100644 --- a/Lib/lib-stdwin/formatter.py +++ b/Lib/lib-stdwin/formatter.py @@ -7,7 +7,7 @@ # formatting, along the lines of TeX; for now, a very simple model # is sufficient. # -class formatter(): +class formatter: # # Initialize a formatter instance. # Pass the window's drawing object, and left, top, right @@ -160,7 +160,7 @@ def test(): # Mac font assignments: font1 = 'times', '', 12 font2 = 'times', 'b', 14 - except NameError: + except ImportError: # X11R4 font assignments font1 = '*times-medium-r-*-120-*' font2 = '*times-bold-r-*-140-*' diff --git a/Lib/stdwin/formatter.py b/Lib/stdwin/formatter.py index d1cd155804be..aea7deb6e5e7 100755 --- a/Lib/stdwin/formatter.py +++ b/Lib/stdwin/formatter.py @@ -7,7 +7,7 @@ # formatting, along the lines of TeX; for now, a very simple model # is sufficient. # -class formatter(): +class formatter: # # Initialize a formatter instance. # Pass the window's drawing object, and left, top, right @@ -160,7 +160,7 @@ def test(): # Mac font assignments: font1 = 'times', '', 12 font2 = 'times', 'b', 14 - except NameError: + except ImportError: # X11R4 font assignments font1 = '*times-medium-r-*-120-*' font2 = '*times-bold-r-*-140-*'