Skip to content

Commit

Permalink
fixing usage docs
Browse files Browse the repository at this point in the history
  • Loading branch information
maccam912 committed Oct 18, 2022
1 parent 01ddec8 commit 77c011c
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions docs/usage.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# Usage

```{eval-rst}
.. click:: add_only_dictionary.__main__:main
:prog: add-only-dictionary
:nested: full
```python
from add_only_dictionary import AODict

regular_dict: Dict = {"a": 1}
ao_dict: AODict = AODict(regular_dict)

ao_dict["b"] = 2 # works!
ao_dict["a"] = 3 # Nothing happens...
ao_dict["a"] == 1 # True, since the key already existed.
```

0 comments on commit 77c011c

Please sign in to comment.