[Django]-What's the difference between quantize() and str.format()?

8👍

Decimal.quantize returns a new Decimal that has a different value.

''.format() formats a string.

In this particular case printing the result yields the same output. Other than that they are totally different operations returning totally different types.

👤Seth

Leave a comment