diff options
Diffstat (limited to 'Lib')
-rwxr-xr-x | Lib/UserString.py | 4 | ||||
-rw-r--r-- | Lib/encodings/utf_32.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Lib/UserString.py b/Lib/UserString.py index c55c1bf1a7..de50396455 100755 --- a/Lib/UserString.py +++ b/Lib/UserString.py @@ -197,7 +197,7 @@ class MutableString(UserString): elif step != 1: # XXX(twouters): I guess we should be reimplementing # the extended slice assignment/deletion algorithm here... - raise TypeError, "invalid step in slicing assignment" + raise TypeError("invalid step in slicing assignment") start = min(start, stop) self.data = self.data[:start] + sub + self.data[stop:] else: @@ -212,7 +212,7 @@ class MutableString(UserString): start, stop = stop+1, start+1 elif step != 1: # XXX(twouters): see same block in __setitem__ - raise TypeError, "invalid step in slicing deletion" + raise TypeError("invalid step in slicing deletion") start = min(start, stop) self.data = self.data[:start] + self.data[stop:] else: diff --git a/Lib/encodings/utf_32.py b/Lib/encodings/utf_32.py index 4bbd22a019..f0b7709a23 100644 --- a/Lib/encodings/utf_32.py +++ b/Lib/encodings/utf_32.py @@ -127,7 +127,7 @@ class StreamReader(codecs.StreamReader): elif byteorder == 1: self.decode = codecs.utf_32_be_decode elif consumed>=4: - raise UnicodeError,"UTF-32 stream does not start with BOM" + raise UnicodeError("UTF-32 stream does not start with BOM") return (object, consumed) ### encodings module API |