Re: Define the class of an individual dynamically
Posted by Jiba on
URL: http://owlready.306.s1.nabble.com/Define-the-class-of-an-individual-dynamically-tp688p689.html
Hi,
To add a second class B to i, you can use the two following syntax:
i.is_a.append(B)
or:
B(i)
You may get an error if the resulting instance is not valid in Python (e.g. metaclass conflict), but normally Owlready prevents these problems.
Best regards,
Jiba