wenima / data-structures

used for all data structure assignments
1 stars 0 forks source link

fold _node_values into display #3

Open wenima opened 7 years ago

wenima commented 7 years ago
+    def _node_values(self):
+        """Helper function to return an iterable of node values"""
+        node_values = [node.value for node in self._iterate_from(self.head)]
+        return node_values

You could've folded this into the display method

wenima commented 7 years ago

not sure I understand this. there is a benefit to have access to the node values or otherwise the generator would have to be written by the function that needs access to all the values in the node