Closed
Description
typing.NewType
has always had an attribute __supertype__
pointing to its supertype. It is widely used in the wild (e.g. https://github.com/pydantic/pydantic/blob/00158878cb1c6218cd58ee62248db56c65e4172c/pydantic/_internal/_typing_extra.py#L153, https://github.com/quora/pyanalyze/blob/bd7f520adc2d8b098be657dfa514d1433bea3b0c/pyanalyze/annotations.py#L456), but not documented. Let's document it and commit to leaving it stable.