From: Mike Bayer Date: Mon, 16 Jul 2007 21:35:46 +0000 (+0000) Subject: regexp searches for negative decimals too X-Git-Tag: rel_0_4_6~100 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d5f048d8a3b948cd57028a588cff914fe261065;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git regexp searches for negative decimals too --- diff --git a/lib/sqlalchemy/ansisql.py b/lib/sqlalchemy/ansisql.py index 32c6e7ac48..3e6ddd34c5 100644 --- a/lib/sqlalchemy/ansisql.py +++ b/lib/sqlalchemy/ansisql.py @@ -449,7 +449,7 @@ class ANSICompiler(engine.Compiled): self.generated_ids['anonymous'] = anonymous_counter + 1 self.generated_ids[('anonymous', ident)] = newname return newname - return re.sub(r'{ANON (\d+) (.*)}', anon, name) + return re.sub(r'{ANON (-?\d+) (.*)}', anon, name) def bindparam_string(self, name): return self.bindtemplate % name