summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/ext/declarative.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/ext/declarative.py')
-rw-r--r--lib/sqlalchemy/ext/declarative.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/sqlalchemy/ext/declarative.py b/lib/sqlalchemy/ext/declarative.py
index 85ccea648..ad8636080 100644
--- a/lib/sqlalchemy/ext/declarative.py
+++ b/lib/sqlalchemy/ext/declarative.py
@@ -239,8 +239,7 @@ def _as_declarative(cls, classname, dict_):
our_stuff[k] = prop
# set up attributes in the order they were created
- our_stuff.sort(lambda x, y: cmp(our_stuff[x]._creation_order,
- our_stuff[y]._creation_order))
+ our_stuff.sort(key=lambda key: our_stuff[key]._creation_order)
table = None
if '__table__' not in cls.__dict__: