Skip to content

Commit

Permalink
Added examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco-Sulla authored Feb 3, 2022
1 parent cca43f5 commit 35611f4
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,21 @@ fd5
id(fd5) != id_fd5
# True

fd.set(1, 2)
# frozendict.frozendict({'Sulla': 'Marco', 'Hicks': 'Bill', 1: 2})

fd.set("Sulla", "Giulia")
# frozendict.frozendict({'Sulla': 'Giulia', 'Hicks': 'Bill'})

fd.delete("Sulla")
# frozendict.frozendict({'Hicks': 'Bill'})

fd.setdefault("Sulla", "Giulia")
# frozendict.frozendict({'Sulla': 'Marco', 'Hicks': 'Bill'})

fd.setdefault(1, 2)
# frozendict.frozendict({'Sulla': 'Marco', 'Hicks': 'Bill', 1: 2})

fd2 = fd.copy()
fd2 == fd
# True
Expand Down

0 comments on commit 35611f4

Please sign in to comment.