Created
July 17, 2018 21:52
-
-
Save arnauorriols/7dc574355bf5f43bd3a66b3d648467e2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import NamedTuple | |
from mypy_extensions import TypedDict | |
A = TypedDict("A", { # error: Recursive types not fully supported yet, nested types replaced with "Any" | |
"b": B, | |
"c": C | |
}) | |
B = TypedDict("B", { | |
"c": C | |
}) | |
C = TypedDict("C", { | |
"name": str | |
}) | |
class An(NamedTuple): # error: Recursive types not fully supported yet, nested types replaced with "Any" | |
b: Bn | |
c: Cn | |
class Bn(NamedTuple): | |
c: Cn | |
class Cn(NamedTuple): | |
name: str |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment