valute.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:tumanov_castleoaks 作者: Roamdev 项目源码 文件源码
def __init__(self, value='0', rounding=ROUND_CEILING):
        # ????????? ??????????????
        self._formatter = get_formatter()

        # ?????????????? ?????
        context = getcontext().copy()
        context.prec = 18
        context.rounding = rounding
        value = Decimal(value)
        self._value = value.quantize(Decimal('.1') ** self._formatter['decimal_places'], context=context)

        # ????? ? ??????? ?????
        self._int, self._frac = str(self._value).rsplit('.', 1)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号