Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How does Grumpy handle Decimal in Python? As far as I am aware there isn't an equivalent in Go.


The decimal module in Python 2.7 is implemented in pure Python: https://github.com/python/cpython/blob/2.7/Lib/decimal.py (in Python 3 there is an accelerated extension module that's used when available, falling back on the pure Python version otherwise).


So, does Decimal work with Grumpy (you're implying it does)?

For that matter, does Grumpy match CPython's Float behavior exactly?

ie.:

    >>> 2.2 + 3.1
    5.300000000000001
    >>>


I'm implying that they can get the decimal module into Grumpy by implementing enough of Python to support the module (i.e. they don't need to implement the decimal module from scratch because the module isn't implemented only in C).


Got it. Thanks for the clarification, Brett.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: