- changed status to resolved
SafeNumeric TypeDecorator recipe on documentation: wrong semantics
When rounding a Decimal to fit in a database column, the number of digits that must remain following the decimal point should be the scale — please correct me if I am interpreting this incorrectly; I'm using the terminology from MySQL docs. According to this understanding, in the SafeNumeric TypeDecorator recipe in the Custom Types section of the documentation, the values are being rounded using precision - scale
digits, which is actually the number of digits before the decimal point. So that should be replaced by just scale
.
Comments (4)
-
repo owner -
repo owner - fix quantize recipe, fixes
#3322
→ <<cset e42d8184ac08>>
- fix quantize recipe, fixes
-
repo owner - fix quantize recipe, fixes
#3322
(cherry picked from commit e42d8184ac087e12e463f938e6a07759cc6392ca)
→ <<cset 891fec2f5fad>>
- fix quantize recipe, fixes
-
repo owner had to check where I got that from originally to see if it was wrong there also, and it wasn't! No idea how that subtraction got in there.
- Log in to comment
#3322→ <<cset d5971b443038>>