# Type() function in Python

**URL:** <https://discuss.python.org/t/type-function-in-python/9631>\
**Category:** Python Help\
**Tags:** help\
**Created:** [July 10, 2021, 9:04am UTC](https://discuss.python.org/t/type-function-in-python/9631 "2021-07-10T09:04:56Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Speedy](https://avatars.discourse-cdn.com/v4/letter/s/ecae2f/32.png) [@Speedy](https://discuss.python.org/u/Speedy)\
**Post date:** [July 10, 2021, 12:39pm UTC](https://discuss.python.org/t/type-function-in-python/9631/3 "2021-07-10T12:39:07Z")

</div>

Just know type is a metaclass, like a patern for all class and defined hineritances. Asking the “type” of an object is like asking from what type he is hinerited.  
After, it’s quite easy, just ask you what is in the parentheses.

- In the 1st, it’s an element of classe try1, it’s like when you write:  
a = try1()  
type(a)
- In the 2nd it’s the class, which is inherited from type, like all class:  
type(int) → type
- In the 3rd, like we sew before, it’s the class type, which is also a class, so doing like others:  
type(type) → type
- for third it’s the same

![image](https://us1.discourse-cdn.com/flex002/uploads/python1/original/2X/1/1c58d6f633a57e334a555dec04b0feb77e3a4b05.png)

type(thing) is like int(thing)

---

_[View the full topic](https://discuss.python.org/t/type-function-in-python/9631)._
