When are objects of type type
instantiated in Python?
I understand that Python classes are objects themselves (being instances of class type
). When are these objects instantiated?
I guess it's either on module import or on the first instantiation of the class, but I could not find any documentation on this topic. I'm especially interested in answers for Python 2.7, but would like to be pointed to (possible) differences in Python 3 as well.