else
This commit is contained in:
parent
379462534c
commit
e81e2a22bf
1 changed files with 1 additions and 1 deletions
|
@ -34,7 +34,7 @@ class Stack:
|
||||||
value = str(value)
|
value = str(value)
|
||||||
elif key == "maxlen" and value is not None:
|
elif key == "maxlen" and value is not None:
|
||||||
if value < 0:
|
if value < 0:
|
||||||
raise StackError()
|
raise StackError("Cannot set `maxlen` below 0")
|
||||||
if len(self) > value:
|
if len(self) > value:
|
||||||
sizediff = len(self) - value
|
sizediff = len(self) - value
|
||||||
sizediff = str(sizediff)
|
sizediff = str(sizediff)
|
||||||
|
|
Loading…
Reference in a new issue