Closed ittus closed 7 years ago
The main reason comes from a lack of precision. 1.1 + 2.2
in Python is 3.3000000000000003
. Floating point imprecision may be acceptable in some cases, but not with money. That's the biggest reason why we don't support them.
In any case, the amount
property is only documented as a string or a Decimal, so we'd recommend sticking to those. It happens to be "smart" enough to convert int
s, but that's undocumented and therefore unsupported.
We're going to close this issue. Feel free to open a new issue if you run into other problems!
Description:
I created a transaction with following code:
or
and got error:
If I do
or
then it's ok.
Why doesn't
braintree/util/generator.py
check forfloat
type?Enviroment: braintree==3.35.0 python3.4