Replies: 3 comments 1 reply
-
Your example said that, in That evidently clashes with your usage, which ties subclasses to specific values for
... I leave selecting specific subclass based on |
Beta Was this translation helpful? Give feedback.
-
Yes, you are right! Once examined with a cool head, is much better like this. :) Thank you for suggestions. Good job! Cheers, PS: Just a rough tentative about selecting specific subclass based on rdf:type, for the interested.
|
Beta Was this translation helpful? Give feedback.
-
I also just stumbled on the same same issue, as I have implemented a subclass of Resource that sets a type. I'm not sure if the current behavior is that strait forward and easy to understand. Wouldn't it be better to let use cases that what their implementation to return instances of their subclass overwrite the |
Beta Was this translation helpful? Give feedback.
-
When creating a class that inherits from Resource, any resource generated from inside the subclass is initialized as the subclass (not as Resource).
Exemple:
Outputs:
Edit: rdflib version is 4.2.1
Cheers,
Marc
Beta Was this translation helpful? Give feedback.
All reactions