Letractively / rdflib

Automatically exported from code.google.com/p/rdflib
Other
0 stars 0 forks source link

Literal(True) creates literals of type xsd:integer not xsd:boolean #88

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. print Literal(True).datatype

What is the expected output? What do you see instead?

Datatype should be xsd:boolean but it is xsd:integer. This bug is related
to the fact that in python "bool" is subclass of "int", and Literal first
does "isinstance(obj, int)" and only then "isinstance(obj, bool)". Patch
attached.

What version of the product are you using? On what operating system?

rdflib 2.4.2. This issue seems to be already fixed in 2.5.x

Original issue reported on code.google.com by cuu...@gmail.com on 29 Oct 2009 at 12:57

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by eik...@gmail.com on 1 Feb 2010 at 7:29

GoogleCodeExporter commented 9 years ago

Original comment by eik...@gmail.com on 1 Feb 2010 at 7:29

GoogleCodeExporter commented 9 years ago

Original comment by eik...@gmail.com on 1 Feb 2010 at 8:53

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r1753.

Original comment by eik...@gmail.com on 2 Feb 2010 at 9:01

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 9391f9cd457c.

Original comment by eik...@gmail.com on 30 Mar 2011 at 9:06