I have used type() function in my program...
I just want to know how does Python implement this? Or where could I find the source code file that implement this function?
I have used type() function in my program... I just want to know how does Python implement this? Or where could I find the source code file that implement this function? |
|||
add comment |
The type() function is implemented in C. Here's a link to the source: http://hg.python.org/cpython/file/0f837071fd97/Objects/typeobject.c |
|||||||||
|
In general
If above didn't work, you need to look into python development source code. Regarding |
|||||||||
|
type
is not only a function, it is the base class for all metaclasses of new-style classes. See Python's data model for further reading. – ephemient Apr 19 '12 at 4:11