[Python-Dev] convertibility
Samuele Pedroni
Samuele Pedroni" <pedroni@inf.ethz.ch
Sat, 24 Aug 2002 16:00:28 +0200
FYI , in _Jython_ given the java class
public class A {
public void fi(int i) {}
public void fd(double d) {}
public void fs(String s) {}
}
import A
a=A()
one can call
a.fi with a Python integer or long
a.fd with a Python integer or long or float
a.fs only with a Python string
[yes with type categories or adapt we could do better,
but the design prefers to minimize unexpected behaviour,
and in practice is not too much constraining]
regards.