■ setcontext 함수를 사용해 Decimal 객체의 환경을 설정하는 방법을 보여준다.
▶ 예제 코드 (PY)
1 2 3 4 5 6 7 8 9 |
import decimal decimal.setcontext(decimal.DefaultContext) decimal.setcontext(decimal.BasicContext) decimal.setcontext(decimal.ExtendedContext) |
■ setcontext 함수를 사용해 Decimal 객체의 환경을 설정하는 방법을 보여준다.
▶ 예제 코드 (PY)
1 2 3 4 5 6 7 8 9 |
import decimal decimal.setcontext(decimal.DefaultContext) decimal.setcontext(decimal.BasicContext) decimal.setcontext(decimal.ExtendedContext) |