From: Mike Bayer Date: Thu, 12 Mar 2015 15:48:47 +0000 (-0400) Subject: - fix quantize recipe, fixes #3322 X-Git-Tag: rel_1_0_0b1~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e42d8184ac087e12e463f938e6a07759cc6392ca;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - fix quantize recipe, fixes #3322 --- diff --git a/doc/build/core/custom_types.rst b/doc/build/core/custom_types.rst index 8d0c42703b..7fca1a537b 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):