Skip to content

Commit 2663591

Browse files
authored
[Simple Linked List]: Updated Stub File (#3834)
* Reworked stub to clean up mutable default argument and missing special method. * Added bethanyg as contributor.
1 parent f214698 commit 2663591

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

exercises/practice/simple-linked-list/.meta/config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"cmccandless"
44
],
55
"contributors": [
6+
"Bethanyg",
67
"Dog",
78
"N-Parsons",
89
"rootulp",

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)