Administrator
|
Hi,
.search() expects keyword arguments or the form "property_name = value", for example :
clients = onto.search(have_buy = car)
if you don't know the property name at runtime, you can use **:
prop_name = "have_buy"
clients = onto.search(** {prop_name : car})
If you want to search for the property between objects, .search() is not appropriate for that. SPARQL can do it, or a loop over the various properties (iterate on properties, and verify if they have at least one car).
Best regards,
Jiba
|