|
Hi!
This might be an easy thing to do, but I cannot figure it out. I have a function that I want to make dynamic for creating individuals. The issue is, I do not know how to check the type of the object being passed (the string type is easy).
The function pseudocode is below:
generate_base_individual(self,iri:str ,fullySpecifiedName:str ,parent_class):
parent_of_ind = None
if isinstance(parent_class,str):
find the class in ontology and set to parent_of_ind
elif isinstance(parent_class,???):
parent_of_ind = parent_class
new_ind = parent_of_ind(iri,namespace=....)
My challenge is, what should be in the ???. This could easily be passed from another function or entity, and I wanted to make sure that I tested the right object type.
Any help would be really greatly appreciated!
Thanks!
Jon
|