Skip to content

Commit

Permalink
[Simple Linked List]: Updated Stub File (#3834)
Browse files Browse the repository at this point in the history
* Reworked stub to clean up mutable default argument and missing special method.

* Added bethanyg as contributor.
  • Loading branch information
BethanyG authored Dec 2, 2024
1 parent f214698 commit 2663591
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions exercises/practice/simple-linked-list/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"cmccandless"
],
"contributors": [
"Bethanyg",
"Dog",
"N-Parsons",
"rootulp",
Expand Down
13 changes: 8 additions & 5 deletions exercises/practice/simple-linked-list/simple_linked_list.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
class EmptyListException(Exception):
pass


class Node:
def __init__(self, value):
pass
Expand All @@ -10,7 +14,10 @@ def next(self):


class LinkedList:
def __init__(self, values=[]):
def __init__(self, values=None):
pass

def __iter__(self):
pass

def __len__(self):
Expand All @@ -27,7 +34,3 @@ def pop(self):

def reversed(self):
pass


class EmptyListException(Exception):
pass

0 comments on commit 2663591

Please sign in to comment.