|
From: Samuele P. <pe...@in...> - 2001-09-23 16:18:12
|
Hi. [Ype Kingma] > ^ is the xor operator in python, and __xor__ and __rxor__ are the functions > that can implement it for either objects involved (the left and the right > one respectively). Neither 10 or TransmitPower has such a method defined. > You might try and use the built in pow() function > http://www.python.org/doc/current/lib/built-in-funcs.html Right, further Python has a FORTRAN-like power operator >>>print 2**3 8 It is equivalent to pow built-in. [J D] > I tried to subclass a PyFloat object to a java Double object using something like: ^ coerce/convert? > >>Double newDouble = result.__tojava__( new Double( 0.0 ) ) without success. Try result.__tojava__(Double.class) or new Double(org.python.core.Py.py2double(result)) > >>The leading and trailing underscores are a bit different. Ype Kingma> I'm afraid I miss the point here. Me too. regards. |