Files
pydantic/docs/examples/postponed_annotations_broken.py
T
Samuel Colvin 17b5ff42c1 renaming docs examples (#972)
* renaming docs examples

* tweaks
2019-11-07 14:40:44 +00:00

11 lines
281 B
Python

from __future__ import annotations
from pydantic import BaseModel
def this_is_broken():
# List is defined inside the function so is not in the module's
# global scope!
from typing import List
class Model(BaseModel):
a: List[int]
print(Model(a=(1, 2)))