I have extend IronPython with a function (no overloads, no generics, always returns string)
public string get_in_param(string key)
In my python script I have a call
step = int(myextension.get_in_param("step"))
There I - sometimes - get
Multiple targets could match: int(type, IList[Byte]), int(type, object), int(type, Extensible[float])
I read IronPython overload resolution on generic types about possible overloads, but my function always returns string, and int() is built in. Also, something like
step = int.Overloads[str](myextension.get_in_param("step"))
is not working (runtime error that Overloads is invalid).
"step" always contains the string representation of an integer. I am using IronPython 2.7.4 embedded into an application.
Why the sporadic error, and how to fix it?
Update:
More details on get_in_param:
Dictionary<string, string> dict = ...
public string get_in_param(string key)
{
string res = null;
dict.TryGetValue(key);
return res;
}