mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Whitespace normalization.
This commit is contained in:
parent
700f36c752
commit
eba28bea9b
14 changed files with 28 additions and 30 deletions
|
@ -147,12 +147,12 @@ class MutableString(UserString):
|
|||
raise TypeError, "unhashable type (it is mutable)"
|
||||
def __setitem__(self, index, sub):
|
||||
if index < 0:
|
||||
index += len(self.data)
|
||||
index += len(self.data)
|
||||
if index < 0 or index >= len(self.data): raise IndexError
|
||||
self.data = self.data[:index] + sub + self.data[index+1:]
|
||||
def __delitem__(self, index):
|
||||
if index < 0:
|
||||
index += len(self.data)
|
||||
index += len(self.data)
|
||||
if index < 0 or index >= len(self.data): raise IndexError
|
||||
self.data = self.data[:index] + self.data[index+1:]
|
||||
def __setslice__(self, start, end, sub):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue