What is the purpose of checking self.__class__ ? I\'ve found some code that creates an abstract interface class and then checks whether its self.__class__
self.__class__
What is the purpose of that? Is it to check whether the class is a type of itself?
Yes, if you try to construct an object of type Abstract1 it'll throw that exception telling you that you're not allowed to do so.
Abstract1