# types.GenericAlias vs typing.\_GenericAlias

**URL:** <https://discuss.python.org/t/types-genericalias-vs-typing-genericalias/60643>\
**Category:** Python Help\
**Tags:** help\
**Created:** [August 12, 2024, 4:55pm UTC](https://discuss.python.org/t/types-genericalias-vs-typing-genericalias/60643 "2024-08-12T16:55:44Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![mdrissi](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/mdrissi/32/5427_2.png) [@mdrissi](https://discuss.python.org/u/mdrissi)\
**Post date:** [August 13, 2024, 5:32am UTC](https://discuss.python.org/t/types-genericalias-vs-typing-genericalias/60643/4 "2024-08-13T05:32:37Z")

</div>

What’s goal of knowing that? What makes Foo[int] and list[int] related?

If your goal is whether type has type arguments/generic base you can use get\_origin/get\_args. If get\_origin returns None then it’s not a subscripted generic type.

---

_[View the full topic](https://discuss.python.org/t/types-genericalias-vs-typing-genericalias/60643)._
