Is it possible to understand if an object is an instance of a certain class that may be defined in another file?
Tsimopak opened this issue · comments
I have the following code in two files:
person_list.py
class AbstractPerson:
pass
class PersonA(AbstractPerson):
pass
class PersonB(PersonA):
pass
code1.py
from person_list import * # or from person_list import PersonA, PersonB
p1 = PersonA()
p2 = PersonB()
How can I find parts of the code that create instances of a subclass of AbstractPerson?
Is it possible using that library?