Skip to content

Commit

Permalink
update docs on generics, fix #1547 (#1584)
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelcolvin committed May 31, 2020
1 parent 2a5914c commit 63ec6ff
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/usage/models.md
Expand Up @@ -281,6 +281,10 @@ For example, in the example above, if `_fields_set` was not provided,

Pydantic supports the creation of generic models to make it easier to reuse a common model structure.

!!! warning
Generic models are only supported with python `>=3.7`, this is because of numerous subtle changes in how
generics are implemented between python 3.6 and python 3.7.

In order to declare a generic model, you perform the following steps:

* Declare one or more `typing.TypeVar` instances to use to parameterize your model.
Expand Down

0 comments on commit 63ec6ff

Please sign in to comment.