Administrator
|
Hi,
You can do it using the same way:
with Z:
class X(Thing):
def my_function(self): ...
If a class already exists, Owlready does not create a new one but extend the former definition. Here, it will add the function to it.
Notice that, since the previous class is extended, you do not need to mention its superclasses (hence I simply used Thing as parent above).
Jiba
|