underscore in storids

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

underscore in storids

Nicolai
Dear Jean-Baptiste,

I have been enjoying using Owlready2 (Version 0.10) for quite a while now, and today came across the following question:

Do I have to handle storids with ‘_’ (underscore) differently from others?
I have observed in owlready2-based code the following line (but don’t know what it means):

```if class.storid.startswith(‘_’): …```

Why is it needed?

And is this different in Version 0.16 ?

Thanks in advance for any help!
Best
Nicolai
Reply | Threaded
Open this post in threaded view
|

Re: underscore in storids

Jiba
Administrator
Hello,

Storids starting with "_" correspond to blank nodes in version 0.10.

In version 0.16, stroids are integer instead of string; blank nodes correspond to (strictly) negative integers.

Best regards,
Jean-Baptiste Lamy
MCF HDR, Laboratoire LIMICS, Université Paris 13
Reply | Threaded
Open this post in threaded view
|

Re: underscore in storids

Nicolai
Thanks a lot, Jean-Baptiste!
Now that makes sense :)

Best regards,
Nicolai