Closed Vlad421 closed 10 months ago
You forgot the dot between LinkedList and __data Should be like this:
self.assertEqual(linked_list._LinkedList.__data[0].value
Also you shouldn't be able to access the __data variable it's private. But who knows. Python has its flaws
python kind of like 'protect' marked with variables, but you still can access them with this constrution self.assertEqual(linked_list._LinkedListdata[0].value, 1) self.assertEqual(linked_list._LinkedListdata[0].next.value, 3)
run this code
MyClass.__protected - will give no access MyClass._MyClass__proctected - will give access
python kind of like 'protect' marked with variables, but you still can access them with this constrution self.assertEqual(linked_list._LinkedListdata[0].value, 1) self.assertEqual(linked_list._LinkedListdata[0].next.value, 3)
run this code
MyClass.__protected - will give no access MyClass._MyClass__proctected - will give access
Indeed. You can access private vars through this construction.
Fixed issue.
main
/master
README Documentation
/src/README.md
Python Files
test_<module_name>.py
Function Docstring
Function Implementation
Unit Test Suite