fix SequentialCell

This commit is contained in:
“liuxiao” 2020-05-28 22:37:06 +08:00
parent 21da86b393
commit 90b51d6c89
1 changed files with 3 additions and 0 deletions

View File

@ -105,6 +105,9 @@ class SequentialCell(Cell):
self.insert_child_to_cell(name, cell)
else:
raise TypeError('Cells must be list or orderedDict')
else:
for index, cell in enumerate(args):
self.insert_child_to_cell(str(index), cell)
self.cell_list = list(self._cells.values())
def __getitem__(self, index):