Skip to content

Commit

Permalink
Dict type #8
Browse files Browse the repository at this point in the history
  • Loading branch information
tisnik committed Oct 19, 2023
1 parent a70bec4 commit f915f8c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions modern_python/sources/mypy-dict-type-8.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from typing import Dict, Optional

d:Dict[str, Optional[float]] = {}

d["foo"] = 1
d["bar"] = 3.14
d["baz"] = None

print(d)

0 comments on commit f915f8c

Please sign in to comment.