Use Attr*Error.

New class syntax.
This commit is contained in:
Guido van Rossum 1991-12-26 13:03:23 +00:00
parent 4dedbf7197
commit bb3753d720
1 changed files with 2 additions and 2 deletions

View File

@ -13,7 +13,7 @@ from stat import *
# Directory comparison class.
#
class dircmp():
class dircmp:
#
def new(dd, (a, b)): # Initialize
dd.a = a
@ -128,7 +128,7 @@ class dircmp():
dd.report()
try:
x = dd.subdirs
except NameError:
except AttributeError:
return # No subdirectories computed
for x in dd.subdirs.keys():
print