From 77c011cbd5a94d243d31157a4c26e4857addff5f Mon Sep 17 00:00:00 2001 From: Matt Koski Date: Tue, 18 Oct 2022 18:27:11 -0500 Subject: [PATCH] fixing usage docs --- docs/usage.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/docs/usage.md b/docs/usage.md index ca7115b..9232b3f 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -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. ```