summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2015-03-12 11:48:47 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2015-03-12 11:50:00 -0400
commite42d8184ac087e12e463f938e6a07759cc6392ca (patch)
treed9f7e65846ec38f6e7c62957ad690cc495544a59
parent6b76352f46644b4fc978f752bfd9a5d91f316c75 (diff)
downloadsqlalchemy-e42d8184ac087e12e463f938e6a07759cc6392ca.tar.gz
- fix quantize recipe, fixes #3322
-rw-r--r--doc/build/core/custom_types.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/build/core/custom_types.rst b/doc/build/core/custom_types.rst
index 8d0c42703..7fca1a537 100644
--- a/doc/build/core/custom_types.rst
+++ b/doc/build/core/custom_types.rst
@@ -108,7 +108,7 @@ many decimal places. Here's a recipe that rounds them down::
def __init__(self, *arg, **kw):
TypeDecorator.__init__(self, *arg, **kw)
- self.quantize_int = -(self.impl.precision - self.impl.scale)
+ self.quantize_int = - self.impl.scale
self.quantize = Decimal(10) ** self.quantize_int
def process_bind_param(self, value, dialect):