def delete(self, p_todo):
        """ Deletes a todo item from the list. """
        try:
            number = self._todos.index(p_todo)
            del self._todos[number]
            self._update_todo_ids()
            self.dirty = True
        except ValueError:
            # todo item couldn't be found, ignore
            pass
def delete ( self , p_todo ) : try : number = self . _todos . index ( p_todo ) del self . _todos [ number ] self . _update_todo_ids ( ) self . dirty = True except ValueError : pass
Deletes a todo item from the list.