decimal and trunkating

chris cf_1957 at hotmail.com
Fri Jun 3 06:08:39 EDT 2005


"Reinhold Birkenfeld" <reinhold-birkenfeld-nospam at wolke7.net> wrote in
message news:3g8kk4Fb5v3dU1 at individual.net...
> Peter Hansen wrote:
> > Reinhold Birkenfeld wrote:
> >> He is speaking of Decimals...
> >>
> >> d = Decimal("199.999")
> >> d._round(5, decimal.ROUND_DOWN)
> >
> > Is one really supposed to call the underscore methods like that?
>
> Umm... no, I think not ;) But I couldn't find something better.
>
> Reinhold

I'm new to Python ... and I've used decimal._round() as above. What's the
deal with using underscore methods? (A link will do if that'll save you some
typing).






More information about the Python-list mailing list