mirror of
https://github.com/python/cpython.git
synced 2025-07-24 19:54:21 +00:00
More raise statement normalization.
This commit is contained in:
parent
6cd2a2036d
commit
4902e69e40
4 changed files with 8 additions and 8 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue