PyDocs

Nav

Numeric and Mathematical Modules

Context.create_decimal

decimal

method of Context
  • Context.create_decimal(num='0', /)
Create a new Decimal instance from num, using self as the context.

Unlike the Decimal constructor, this function observes the context
limits.
1 Example
>>> Context(prec=5, rounding=ROUND_DOWN).create_decimal('1.2345678')
Decimal('1.2345')
from the Python docs
See Also
No see-alsos for decimal/Context.create_decimal
0 Notes
No notes for Context.create_decimal