File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change 1
1
"""
2
- Test the performance of all of the solutions listed in the following article:
2
+ Tests the performance of all of the solutions listed in the following article:
3
3
https://therenegadecoder.com/code/how-to-empty-a-list-in-python/
4
4
"""
5
5
6
6
from test_bench import test_bench
7
7
8
- def control (anime ):
8
+ def control (anime : list (str )) -> None :
9
+ """
10
+ Provides a control scenario for testing. In this case, all of the solutions
11
+ rely on copying the input list, so the control function accounts for that.
12
+
13
+ :param anime: a list of anime
14
+ """
9
15
anime = anime .copy ()
10
16
11
- def empty_list_by_hand (anime ):
17
+ def empty_list_by_hand (anime : list (str )) -> None :
18
+ """
19
+ Tests the performance of emptying a list by hand.
20
+
21
+ :param anime: a list of anime
22
+ """
12
23
anime = anime .copy ()
13
24
while anime :
14
25
anime .pop ()
You can’t perform that action at this time.
0 commit comments