lucene-pylucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Petrus Hyvönen <>
Subject Automatic typecasting of int to float
Date Sat, 14 Dec 2013 19:46:42 GMT

I am converting some java code to python scripts, using a JCC wrapped library.

One thing that strikes me is that java seems to have a automatic typecast of int to float,
which is not present in the JCC wrapped library.

i.e. if a tmp=100 and obj.shift(tmp) is executed, and the method expects a float, it seems
to fail in the wrapped code while working in java. Of course it can be explicitly typed obj.shift((float)
tmp) but it does look as readable.

This is a minor thing, but could it be enabled so that this automatic conversion from int
to floats are done if no other matching signatures are found? (I assume this is the way java
works, I'm no java expert..) 

Many thanks

View raw message