set_option in Python interface does not work with floats
Bug #1405171 reported by
Christian Jacobs
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Spud |
New
|
Undecided
|
Unassigned |
Bug Description
With the latest version of the trunk, the following code prints out 0.0 instead of 2.5. Setting it as a string "2.5" (or a list, [2.5]) works fine, but this isn't quite what I'm after.
import libspud
f = open("test.flml", "w")
f.write("<?xml version='1.0' encoding=
f.write(
f.write(
f.close()
libspud.
libspud.
a = 2.5
libspud.
print libspud.
To post a comment you must log in.
This appears to be an issue when PyErr_SetString is called in error_checking (libspud.c:39) as a result of a SPUD_NEW_ KEY_WARNING. After calling this function, the value stored in secondArg (libspud:691) seems to get overwritten if it's a float or a double. I've commented out line libspud.c:39 as a work-around.