diff options
author | Guido van Rossum <guido@python.org> | 1998-03-26 21:13:24 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1998-03-26 21:13:24 (GMT) |
commit | 45e2fbc2e70ef28b1f0327207f33dab3a4e825c5 (patch) | |
tree | 24cafdb6ffb07170188292a02440935291327cde /Lib/exceptions.py | |
parent | 9ea7024754f0e42d7fc70fd1c8f6f6cfbf7e1cf0 (diff) | |
download | cpython-45e2fbc2e70ef28b1f0327207f33dab3a4e825c5.zip cpython-45e2fbc2e70ef28b1f0327207f33dab3a4e825c5.tar.gz cpython-45e2fbc2e70ef28b1f0327207f33dab3a4e825c5.tar.bz2 |
Mass check-in after untabifying all files that need it.
Diffstat (limited to 'Lib/exceptions.py')
-rw-r--r-- | Lib/exceptions.py | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/Lib/exceptions.py b/Lib/exceptions.py index c7bbbf4..ba63be6 100644 --- a/Lib/exceptions.py +++ b/Lib/exceptions.py @@ -48,18 +48,18 @@ Exception(*) class Exception: def __init__(self, *args): - self.args = args + self.args = args def __str__(self): if not self.args: return '' - elif len(self.args) == 1: - return str(self.args[0]) - else: - return str(self.args) + elif len(self.args) == 1: + return str(self.args[0]) + else: + return str(self.args) def __getitem__(self, i): - return self.args[i] + return self.args[i] class StandardError(Exception): pass @@ -68,21 +68,21 @@ class SyntaxError(StandardError): filename = lineno = offset = text = None msg = "" def __init__(self, *args): - self.args = args - if len(self.args) >= 1: - self.msg = self.args[0] - if len(self.args) == 2: - info = self.args[1] - try: - self.filename, self.lineno, self.offset, self.text = info - except: - pass + self.args = args + if len(self.args) >= 1: + self.msg = self.args[0] + if len(self.args) == 2: + info = self.args[1] + try: + self.filename, self.lineno, self.offset, self.text = info + except: + pass def __str__(self): return str(self.msg) class IOError(StandardError): def __init__(self, *args): - self.args = args + self.args = args self.errno = None self.strerror = None if len(args) == 2: @@ -146,7 +146,7 @@ class MemoryError(StandardError): class SystemExit(Exception): def __init__(self, *args): - self.args = args + self.args = args if len(args) == 0: self.code = None elif len(args) == 1: |