Cannot print aliases. Many names can belong to the same class. Classes in Python are just values, just like any other, and they can be assigned to names arbitrarily. Import status is just an assignment.
I like to ask how I can find the name of an object in this scenario:
a = b = c = MyClass() d = a
Which name is the "real" name? All a , b , c and d refer to the object, the name is nothing more than any other.
In the code you can:
from mymod import MyClass as Imp_MyClass AlsoMyClass = Imp_MyClass AnotherOne = AlsoMyClass o = AlsoMyClass() o2 = AnotherOne()
Which class name is "correct"?
source share