Hello,

https://aumayr.github.io/beancount-docs-static/api_reference/beancount.core.html?highlight=link#beancount.core.number.D
 
says:

"Convert a string, possibly with commas, into a Decimal object."

However, feeding it a string with comma:

units = amount.Amount(D(row["Soll/Haben"]), "EUR") # .replace(",", "."), 
"EUR")
print(units, row["Soll/Haben"])

outputs:

-3000 EUR -30,00

D() seems to just swallow the comma, not use it as decimal separator, what 
I expect from the doc string. Doing a .replace(",", ".") works, but the 
documentation seems wrong or misleading.

Best Thanks,
Florian

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/3642e8be-b8e0-41e5-93bd-c2a9735fe59e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to