]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Use ImportError.
authorGuido van Rossum <guido@python.org>
Thu, 26 Dec 1991 13:03:52 +0000 (13:03 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 26 Dec 1991 13:03:52 +0000 (13:03 +0000)
New class syntax.

Lib/lib-stdwin/formatter.py
Lib/stdwin/formatter.py

index d1cd155804beb8536c4485f65128dc9400499eb6..aea7deb6e5e7b6baa1e055c28c4c1325e3a6bed6 100644 (file)
@@ -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-*'
index d1cd155804beb8536c4485f65128dc9400499eb6..aea7deb6e5e7b6baa1e055c28c4c1325e3a6bed6 100755 (executable)
@@ -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-*'