%{ #include %} %include pcb_group.h %extend PCB_GROUP { std::deque GetItemsDeque() { std::deque result; const std::unordered_set items = $self->GetItems(); for(BOARD_ITEM* item: items) result.push_back(item); return result; } %pythoncode %{ def GetItems(self): return [item.Cast() for item in self.GetItemsDeque()] %} }