forked from MikiDi/mu-python-template
-
Notifications
You must be signed in to change notification settings - Fork 13
Closed
Description
in the code
mu-python-template/escape_helpers.py
Lines 54 to 60 in 01a4f43
| def sparql_escape_float(obj): | |
| """Converts the given float to a SPARQL-safe RDF object string with the right RDF-datatype. """ | |
| if not isinstance(obj, int): | |
| warn("You are escaping something that isn't a float with \ | |
| the 'sparql_escape_float'-method. Implicit casting will occurr.") | |
| obj = str(float(obj)) | |
| return '"{}"^^xsd:float'.format(obj) |
The obj is checked for isinstance of int, but this should be a float.
Metadata
Metadata
Assignees
Labels
No labels