This question does not make sense. type(X) indicates type X , and the return value does not contain information about the spesific class X , in the same way type("abc") , which is str , does not contain information about the string used as an argument.
If class X has its own metaclass, the answer will always be type , since this is the default metaclass in python. In your case, then mytype is type , that is, they are the same object.
You can use type to check the type of an object if you use a single argument, or using three arguments that you can create a class dynamically:
myclass = type('ClassB', (object,), {"class_attribute": 3.14})
Suppose for a moment that mytype worked the way you thought. Remember that an instance of a type is a class, just like an instance of a class is an object. Thus, in the same way (except for singleton classes) ClassA() is not ClassA() (each instance is unique), mytype() is not mytype() - that is, you must get a different class every time you create an instance of the type. That way you still won't get ClassA . To illustrate the point with code, you can run:
>>> type('A', (object,), {}) == type('A', (object,), {}) False
CANCELING ANSWERS :
Classes in python are "first class citizens", unlike what you have in most compiled languages. This means that you can pass the class directly; you don't need the typeof equivalent:
>>> class A(object): pass ... >>> B = A >>> B() <__main__.A object at 0xb781138c> >>> def print_class_name(cls): ... print cls.__name__ ... >>> print_class_name(B) A
This article provides an excellent explanation of how type , object and object instances are related in python.