kyu_6.default_list package
Submodules
kyu_6.default_list.default_list module
Solution for -> DefaultList.
Created by Egor Kostan. GitHub: https://github.com/ikostan
- class kyu_6.default_list.default_list.DefaultList(lst: list, default_value: str)[source]
Bases:
objectA class called DefaultList.
- extend(items: list) None[source]
Support the regular list functions: extend.
- Parameters:
items – iterable
- Returns:
kyu_6.default_list.test_default_list module
Test for -> DefaultList.
Created by Egor Kostan. GitHub: https://github.com/ikostan
- class kyu_6.default_list.test_default_list.DefaultListTestCase(methodName='runTest')[source]
Bases:
TestCaseTesting ‘DefaultList’ class.
Your job is to create a class (or a function which returns an object) called DefaultList. The class will have two parameters to be given: a list, and a default value. The list will obviously be the list that corresponds to that object. The default value will be returned any time an index of the list is called in the code that would normally raise an error (i.e. i > len(list) - 1 or i < -len(list)).
This class must also support the regular list functions extend, append, insert, remove, and pop.
- _classSetupFailed = False
- _class_cleanups = []
- test_default_list_basic()[source]
Testing ‘DefaultList’ class: __getitem__.
Called to implement evaluation of self[key]. For sequence types, the accepted keys should be integers and slice objects. Note that the special interpretation of negative indexes (if the class wishes to emulate a sequence type) is up to the __getitem__() method. :return:
kyu_6.default_list.test_edge_case_list module
Test for edge case -> DefaultList.
Created by Egor Kostan. GitHub: https://github.com/ikostan
Module contents
DefaultList.