Skip to content

Commit 7b46e8e

Browse files
committed
Reworked stub to clean up mutable default argument and missing special method.
1 parent f214698 commit 7b46e8e

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

exercises/practice/simple-linked-list/simple_linked_list.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
class EmptyListException(Exception):
2+
pass
3+
4+
15
class Node:
26
def __init__(self, value):
37
pass
@@ -10,7 +14,10 @@ def next(self):
1014

1115

1216
class LinkedList:
13-
def __init__(self, values=[]):
17+
def __init__(self, values=None):
18+
pass
19+
20+
def __iter__(self):
1421
pass
1522

1623
def __len__(self):
@@ -27,7 +34,3 @@ def pop(self):
2734

2835
def reversed(self):
2936
pass
30-
31-
32-
class EmptyListException(Exception):
33-
pass

0 commit comments

Comments
 (0)