def append(self, container):
"""Insert objects at the end of the container"""
if not isinstance(container, collections.MutableSequence):
container = [container]
for x in container:
try:
self._container.remove(x)
except ValueError:
pass
self._container.append(x)
if self._current is None and any(self._container):
self._current = self._container[0]
评论列表
文章目录