Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃摑 Update Python Types docs, add missing 3.6 / 3.9 example #4434

Merged
merged 1 commit into from Jan 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/en/docs/python-types.md
Expand Up @@ -252,7 +252,7 @@ The second type parameter is for the values of the `dict`:
=== "Python 3.9 and above"

```Python hl_lines="1"
{!> ../../../docs_src/python_types/tutorial008.py!}
{!> ../../../docs_src/python_types/tutorial008_py39.py!}
```

This means:
Expand Down
5 changes: 4 additions & 1 deletion docs_src/python_types/tutorial008.py
@@ -1,4 +1,7 @@
def process_items(prices: dict[str, float]):
from typing import Dict


def process_items(prices: Dict[str, float]):
for item_name, item_price in prices.items():
print(item_name)
print(item_price)
4 changes: 4 additions & 0 deletions docs_src/python_types/tutorial008_py39.py
@@ -0,0 +1,4 @@
def process_items(prices: dict[str, float]):
for item_name, item_price in prices.items():
print(item_name)
print(item_price)