From c5e29f0eedfd0369cfedfaa8c3e903443fe63a3e Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Thu, 21 Jan 2010 15:56:23 +0000 Subject: [PATCH] fixed the illegal_initial_chars collection + unit test, [ticket:1659] --- lib/sqlalchemy/sql/compiler.py | 2 +- test/sql/test_quote.py | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py index c3ef9288a3..2d099e9d54 100644 --- a/lib/sqlalchemy/sql/compiler.py +++ b/lib/sqlalchemy/sql/compiler.py @@ -47,7 +47,7 @@ RESERVED_WORDS = set([ 'using', 'verbose', 'when', 'where']) LEGAL_CHARACTERS = re.compile(r'^[A-Z0-9_$]+$', re.I) -ILLEGAL_INITIAL_CHARACTERS = set(xrange(0, 10)).union(['$']) +ILLEGAL_INITIAL_CHARACTERS = set([str(x) for x in xrange(0, 10)]).union(['$']) BIND_PARAMS = re.compile(r'(?