Skip to content

Commit

Permalink
Update README example to not overwrite function as variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
alankan886 committed Jun 23, 2024
1 parent b91661e commit 0aaf428
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ from supermemo2 import first_review, review
# first review
# using quality=4 as an example, read below for what each value from 0 to 5 represents
# review date would default to datetime.utcnow() (UTC timezone) if not provided
first_review = first_review(4, "2024-06-22")
# first_review prints { "easiness": 2.36, "interval": 1, "repetitions": 1, "review_datetime": "2024-06-23 01:06:02"))
r = first_review(4, "2024-06-22")
# review prints { "easiness": 2.36, "interval": 1, "repetitions": 1, "review_datetime": "2024-06-23 01:06:02"))

# second review
second_review = review(4, first_review["easiness"], first_review["interval"], first_review["repetitions"], first_review["review_datetime"])
second_review = review(4, r["easiness"], r["interval"], r["repetitions"], r["review_datetime"])
# or just unpack the first review dictionary
second_review = review(4, **first_review)
second_review = review(4, **r)
# second_review prints similar to example above.
```

Expand Down

0 comments on commit 0aaf428

Please sign in to comment.