Browse Source

📝 Add note about Python 3.10 `X | Y` operator in explanation about Response Models (#5307)

pull/5347/head
MendyLanda 3 years ago
committed by GitHub
parent
commit
ae369d879a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      docs/en/docs/tutorial/response-model.md

2
docs/en/docs/tutorial/response-model.md

@ -168,7 +168,7 @@ Your response model could have default values, like:
{!> ../../../docs_src/response_model/tutorial004_py310.py!}
```
* `description: Union[str, None] = None` has a default of `None`.
* `description: Union[str, None] = None` (or `str | None = None` in Python 3.10) has a default of `None`.
* `tax: float = 10.5` has a default of `10.5`.
* `tags: List[str] = []` as a default of an empty list: `[]`.

Loading…
Cancel
Save