Message373778
The top level decimal.py that dispatches to either _decimal or
_pydecimal is pure Python. So perhaps these applications could
add these methods themselves:
>>> import decimal
>>> def exp(x):
... return x.exp()
...
>>> decimal.exp = exp
>>>
>>> from decimal import *
>>> exp(Decimal(2))
Decimal('7.389056098930650227230427461')
As you see, it is no big deal, but it feels a bit odd to have
some methods like exp() and sqrt() exposed in the top level.
We already have:
Decimal.exp()
And:
>>> c = getcontext()
>>> c.exp(Decimal(2))
Decimal('7.389056098930650227230427461') |
|
Date |
User |
Action |
Args |
2020-07-16 22:19:57 | skrah | set | recipients:
+ skrah, rhettinger, facundobatista, mark.dickinson, Jean Abou Samra |
2020-07-16 22:19:57 | skrah | set | messageid: <1594937997.59.0.909463033714.issue41315@roundup.psfhosted.org> |
2020-07-16 22:19:57 | skrah | link | issue41315 messages |
2020-07-16 22:19:57 | skrah | create | |
|