* 3.9_10 fix setitem
This commit is contained in:
parent
f9d8ec192b
commit
3d311f9423
@ -150,10 +150,10 @@ class Stack:
|
|||||||
|
|
||||||
prev = self.top
|
prev = self.top
|
||||||
for i, v in enumerate(self):
|
for i, v in enumerate(self):
|
||||||
prev = v
|
|
||||||
if idx == i:
|
if idx == i:
|
||||||
old = v
|
old = v
|
||||||
break
|
break
|
||||||
|
prev = v
|
||||||
|
|
||||||
value = StackObj.wrap(value)
|
value = StackObj.wrap(value)
|
||||||
value.next = old.next
|
value.next = old.next
|
||||||
@ -190,6 +190,12 @@ def tests():
|
|||||||
+ b"Y7+nfY83sve2;5yU@PTfzga0(74fo(7MpO(T>rF(6!LL(74dGAW3dyWq3t$a&K}X"
|
+ b"Y7+nfY83sve2;5yU@PTfzga0(74fo(7MpO(T>rF(6!LL(74dGAW3dyWq3t$a&K}X"
|
||||||
)
|
)
|
||||||
exec(__import__("base64").b85decode(code))
|
exec(__import__("base64").b85decode(code))
|
||||||
|
# +
|
||||||
|
st = Stack("123")
|
||||||
|
st[1] = "x"
|
||||||
|
assert "1x3" == "".join(
|
||||||
|
map(str, st)
|
||||||
|
), "неверно отработали операторы присвоения данных по индексу и/или получение данных по индексу"
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
Loading…
Reference in New Issue
Block a user