Add Python 2.7-specific comment

This commit is contained in:
Keith Bussell 2018-08-06 21:39:10 -07:00
parent 5bb7db2d6f
commit 6a42128ddf

View File

@ -1135,6 +1135,7 @@ class DecimalField(Field):
return value return value
context = decimal.getcontext().copy() context = decimal.getcontext().copy()
# For Python 2.7 compatibility when using cdecimal
rounding = context.rounding if self.rounding is None else self.rounding rounding = context.rounding if self.rounding is None else self.rounding
if self.max_digits is not None: if self.max_digits is not None:
context.prec = self.max_digits context.prec = self.max_digits