Made a progress report for my project. Request everyone to suggest changes in the report. (link)
Plans for the coming week:
Properly comment the whole code for better understanding.
Bring in my code into the forked repository of stdlib.
The approach for out of index range input in get() and insert() APIs can be handled by using modulo of the input index.
For instance, if in get() API input index is 12 and the size of the list is 7 then the function returns the item stored at the index 5 (12%7). I ask for other’s views regarding the same.
+1
If we want to handle out-of-range indices so that they’re never errors I’d suggest that anything > len(list) appends and anything less than 1 prepends. It is possible that some application will want the modulo behaviour but this is a library component so I’d suggest leaving the weird and unusual to the application.