I have an issue that really drives me mad. Normally doing int(20.0)
would result in 20
. So far so good. But:
levels = [int(gex_dict
It looks like the problem is that gex_dict[i]
actually returns a string representation of a float '20.0'
. Although int() has the capability to cast from a float to an int, and a string representation of an integer to an int. It does not have the capability to cast from a string representation of a float to an int.
The documentation for int can be found here: http://docs.python.org/library/functions.html#int