Martin Blais

Results 208 comments of Martin Blais

**Original comment by Zhuoyun Wei (Bitbucket: [wzyboy](https://bitbucket.org/wzyboy), GitHub: [wzyboy](https://github.com/wzyboy)).** ---------------------------------------- It seems that if '@@' is used, the number after is discarded after the price is calculated: https://bitbucket.org/blais/beancount/src/621cec5ed38bcd128a3502a3b5c367f283deffe2/beancount/parser/grammar.py?at=default&fileviewer=file-view-default#grammar.py-806:816

**Original comment by Martin Blais (Bitbucket: [blais](https://bitbucket.org/blais), GitHub: [blais](https://github.com/blais)).** ---------------------------------------- It's not discarded, but rather, the per-unit price is stored, so there is a division involved. Instead of keeping two...

**Original comment by Zhuoyun Wei (Bitbucket: [wzyboy](https://bitbucket.org/wzyboy), GitHub: [wzyboy](https://github.com/wzyboy)).** ---------------------------------------- Sorry that was a typo. "the number after is discarded" -> "the number after @@ is discaarded". No matter which...

**Original comment by Martin Blais (Bitbucket: [blais](https://bitbucket.org/blais), GitHub: [blais](https://github.com/blais)).** ---------------------------------------- I understand your description. However, I don't find the solution proposed simple enough. It introduces a lot of complexity, and...

**Original comment by Zhuoyun Wei (Bitbucket: [wzyboy](https://bitbucket.org/wzyboy), GitHub: [wzyboy](https://github.com/wzyboy)).** ---------------------------------------- Hmm, it's not just for displaying issues. I mean, a user inputs "@@" and invoke "bean-report print", they see "@"...

**Original comment by Martin Blais (Bitbucket: [blais](https://bitbucket.org/blais), GitHub: [blais](https://github.com/blais)).** ---------------------------------------- DisplayContext is supposed to handle it, but I think I never completed the conversion of all codes to use the...

**Original comment by Zhuoyun Wei (Bitbucket: [wzyboy](https://bitbucket.org/wzyboy), GitHub: [wzyboy](https://github.com/wzyboy)).** ---------------------------------------- Fraction seems nice anyway: ``` >>> from beancount.core.number import D >>> from fractions import Fraction as F >>> D('90.14')/D('13.04')*D('13.04') Decimal('90.13999999999999999999999999')...

**Original comment by Martin Blais (Bitbucket: [blais](https://bitbucket.org/blais), GitHub: [blais](https://github.com/blais)).** ---------------------------------------- I hadn't realized it was built-in. Thx

**Original comment by Jakob Schnitzer (Bitbucket: [yagebu](https://bitbucket.org/yagebu), GitHub: [yagebu](https://github.com/yagebu)).** ---------------------------------------- This kind-of looks like a duplicate of #109 to me, where I suggested the following possible solution: > It would...

**Original comment by Zhuoyun Wei (Bitbucket: [wzyboy](https://bitbucket.org/wzyboy), GitHub: [wzyboy](https://github.com/wzyboy)).** ---------------------------------------- So there are four possible solutions for this issue: 1. Store total price (the number after @@) if @@ is...