In Python the _
is often used as an ignored placeholder.
(path, _) = self._treeView.get_cursor()
You could also avoid unpacking as a tuple is indexable.
def get_selected_index(self):
return self._treeView.get_cursor()[0][0]
In Python the _
is often used as an ignored placeholder.
(path, _) = self._treeView.get_cursor()
You could also avoid unpacking as a tuple is indexable.
def get_selected_index(self):
return self._treeView.get_cursor()[0][0]