# PEP 747: TypeExpr: Type Hint for a Type Expression

**URL:** <https://discuss.python.org/t/pep-747-typeexpr-type-hint-for-a-type-expression/55984>\
**Category:** Typing\
**Created:** [June 17, 2024, 2:34pm UTC](https://discuss.python.org/t/pep-747-typeexpr-type-hint-for-a-type-expression/55984 "2024-06-17T14:34:41Z")\
**Posts on this page:** 1\
**Showing post:** 60

<div class="post-metadata">

**Author:** ![zhangyx](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/zhangyx/32/23808_2.png) [@zhangyx](https://discuss.python.org/u/zhangyx)\
**Post date:** [November 6, 2024, 5:51pm UTC](https://discuss.python.org/t/pep-747-typeexpr-type-hint-for-a-type-expression/55984/60 "2024-11-06T17:51:54Z")

</div>

I just discovered this thread (I wish I could find it earlier…). I was proposing something similar a few days ago under the “idea” topic: [run-time type checking using parameterized types](https://discuss.python.org/t/runtime-type-checking-using-parameterized-types/70173/13).

I also created a working implementation “`rttc`” for it and published it on [GitHub](https://github.com/zhangyx1998/rttc) and [PyPi](https://pypi.org/project/rttc/).

I am wondering if the proposed `is_assignable()` is somewhat analogous to `type_check()`, i.e. how it behaves for the following cases?

1. Nested types

2. Templated class instances

* * *

> P.S. I encountered some difficulties during the implementation of `rttc`. Namely (1) [the timing of `orig_class` availability](https://github.com/python/typing/issues/658) and (2) some issues with ` __annotation__ ` which does not include parent classes’ annotated variables. The first one has been solved by proxying `_GenericAlias. __call__ ` but the second one remains unsolved. I plan to open a post under `typing` for them, if appropriate.

---

_[View the full topic](https://discuss.python.org/t/pep-747-typeexpr-type-hint-for-a-type-expression/55984)._
