SafeNumeric TypeDecorator recipe on documentation: wrong semantics

Issue #3322 resolved
Eduardo Dobay created an issue

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)

  1. Mike Bayer 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.

  2. Log in to comment