Create a Python module that contains an iterable data structure, a sort method and a filter method, together with complete PyUnit unit tests (100% coverage). The module must be reusable in other projects. Update your code for Assignment6-9 to use the data structure (for storing objects in the repository) and both functions (in the repository or service layer) from this module.
- Implement an iterable data structure. Study the
__setItem__,__getitem__,__delItem__,__next__and__iter__Python methods. - Implement a sorting algorithm that was not/will not be studied during the lecture or seminar (no bubble sort, cocktail sort, merge sort, insert sort, quicksort). You can use one of shell sort, comb sort, bingo sort, gnome sort, or other sorting method. Prove that you understand the sorting method implemented. The sort function will accept two parameters: the list to be sorted as well as a comparison function used to determine the order between two elements.
- Implement a filter function that can be used to filter the elements from a list. The function will use 2 parameters: the list to be filtered, and an acceptance function that decided whether a given value passes the filter.
Deadline is week 12.