def __init__(self, selection_list=None, flags=None):
if not selection_list:
self.data = []
super().__init__(selection_list, flags=flags)
if selection_list:
assert issubclass(type(selection_list), col.Sequence), \
"selection_dict must be a subclass of collections.Sequence, not {}".format(
type(selection_list))
self.data = selection_list
# if values in the selection_list are SelectionMembers update
# their registries
for idx, member in enumerate(self.data):
if issubclass(type(member), SelectionMember):
member.register_selection(idx, self, flags=flags)
评论列表
文章目录