Skip to content

Commit ba2a312

Browse files
DA-southamptonEhco1996
authored andcommitted
Update bag_adt.py
1 parent 903dd43 commit ba2a312

File tree

1 file changed

+1
-1
lines changed
  • docs/01_抽象数据类型和面向对象编程

1 file changed

+1
-1
lines changed

docs/01_抽象数据类型和面向对象编程/bag_adt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def __init__(self, maxsize=10):
88
self._items = list()
99

1010
def add(self, item):
11-
if len(self) > self.maxsize:
11+
if len(self) >= self.maxsize:
1212
raise Exception('Full')
1313
self._items.append(item)
1414

0 commit comments

Comments
 (0)