Skip to content

Commit

Permalink
Merge pull request #21 from brennerm/return-id-after-adding
Browse files Browse the repository at this point in the history
add printing of id after adding a task
  • Loading branch information
sjl authored Apr 11, 2020
2 parents df1befe + ab19514 commit d23ce12
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions t.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,9 @@ def add_task(self, text):
task_id = _hash(text)
self.tasks[task_id] = {'id': task_id, 'text': text}

prefixes = _prefixes(self.tasks)
print(prefixes[task_id])

def edit_task(self, prefix, text):
"""Edit the task with the given prefix.
Expand Down

0 comments on commit d23ce12

Please sign in to comment.