Running the test for the Zed’s dictionary code, it hits an error in my implementation of the doubly linked list from Ex 14. I started by typing out the dictionary source code and then ended up copying and pasting it so I know that that is not the issue. It also runs fine with the solution code found in the solutions repository.
You can find my implementation of the doubly linked list here.
The error I get when running the tests is as follows:
Traceback (most recent call last):
File "dicTest.py", line 6, in <module>
states.set('Oregon', 'OR')
File "C:\Users\redacted\Algorithms\dictionary.py", line 54, in set
bucket.push((key, value))
AttributeError: 'NoneType' object has no attribute 'push'
I know that somewhere I am having an issue handling None - something is not working the way I expect it to - but I am totally lost as to where this is coming from. I need a second pair of eyes on my code. Can anyone help me find the original source of the error?
Also feel free to point out any other issues with my implementation.