Issue1734

classification
Title: no integration with java.math.BigDecimal and java.math.BigInteger
Type: Severity: normal
Components: Core Versions: Jython 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: doublep, fwierzbicki
Priority: low Keywords:

Created on 2011-04-18.14:01:52 by doublep, last changed 2013-02-19.23:49:33 by fwierzbicki.

Messages
msg6497 (view) Author: (doublep) Date: 2011-04-18.14:01:51
Trivial to reproduce:

>>> from java.math import BigDecimal
>>> BigDecimal ('1.00') - BigDecimal ('0.50')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: unsupported operand type(s) for -: 'java.math.BigDecimal' and 'java.math.BigDecimal'

At the very least Jython should allow arithmetics of a java.math type with itself.  Ideally it should smoothly handle cross-type arithmetics as well.
msg7708 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2013-02-19.23:49:33
The workaround is pretty easy as I'm sure you know: use BigDecimal's add method. If someone wants to submit a patch that handles this I'd be happy to review it. It should go against 2.7 though.
History
Date User Action Args
2013-02-19 23:49:33fwierzbickisetpriority: low
nosy: + fwierzbicki
messages: + msg7708
versions: + Jython 2.7, - 2.5.2rc
2011-04-18 14:01:52doublepcreate