To add to this, you could potentially consider `typing.NewType` as precedent. Whilst it is an introspectable class at runtime, `NewType.__call__` is just also just a no-op and only gains meaning when a type checker is applied.(forgive the bad example)```Volume = NewType("Volume", int)type(N) # <class 'typing.NewType'>tv_volume = Volume(50)type(tv_volume) # <class `int`>```On Mon, Jan 17, 2022 at 7:19 PM Eric Traut <eric@traut.com> wrote:It's similar to `typing.cast`, which is part of stdlib. The `cast` call acts as a no-op at runtime but has special meaning to type checkers.
_______________________________________________
Typing-sig mailing list -- typing-sig@python.org
To unsubscribe send an email to typing-sig-leave@python.org