≈ the.bay.news

Add built-in function "dec" to replace "decimal.Decimal" and apply for "d" suffix for it

Discussions on Python.org
Add built-in function "dec" to replace "decimal.Decimal" and apply for "d" suffix for it
Here are my suggestions: I think that we can add a built-in type called dec to replace decimal.Decimal. Reason: It is well-used and it’s convenient. We don’t need to import decimal to use Decimal, and dec is different from decimal or Decimal, so it won’t influence the codes now. Use d suffix to be simpler. like 2.3d or 56D and it will be as a string to dec(). Make a new standard library decmath for the math functions like log10 of dec. Don’t use xxx.log10() and replace it to decmath.log10(xxx...

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.