From 7b46e8ee6ebb58d48101840b8ccc7a9862c1eafa Mon Sep 17 00:00:00 2001 From: BethanyG Date: Sun, 1 Dec 2024 22:09:55 -0800 Subject: [PATCH] Reworked stub to clean up mutable default argument and missing special method. --- .../simple-linked-list/simple_linked_list.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/exercises/practice/simple-linked-list/simple_linked_list.py b/exercises/practice/simple-linked-list/simple_linked_list.py index cbf120e2fc..dfb9e6c979 100644 --- a/exercises/practice/simple-linked-list/simple_linked_list.py +++ b/exercises/practice/simple-linked-list/simple_linked_list.py @@ -1,3 +1,7 @@ +class EmptyListException(Exception): + pass + + class Node: def __init__(self, value): pass @@ -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): @@ -27,7 +34,3 @@ def pop(self): def reversed(self): pass - - -class EmptyListException(Exception): - pass