When reading in an existing ontology file I am wondering what is the correct way to access the underlying data type of a datatype property. For example, I am reading in an ontology which has a datatype property of type http://www.w3.org/2001/XMLSchema#unsignedLong. Examining the .range attribute for this once owlready2 has parsed the ontology, I see it represented as the python int type. However, writing out the ontology to a new file persists the datatype as XMLSchema#unsignedLong as expected, so somehow the type information is persisted. The question is: how is that underlying data type accessed from Python? I can't find any attribute that seems to reference it.
I see Property.range_iri is now available in the version from Pypi as well.
This is very useful information. I found this message because I discovered that Property.range returns inconsistent results - some XMLSchema types appear to be converted but others are not. It might be safer not to convert any - or convert all of them?