diff options
Diffstat (limited to 'lib/sqlalchemy/sql.py')
-rw-r--r-- | lib/sqlalchemy/sql.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqlalchemy/sql.py b/lib/sqlalchemy/sql.py index 994a877bd..7d4bbcc78 100644 --- a/lib/sqlalchemy/sql.py +++ b/lib/sqlalchemy/sql.py @@ -1704,7 +1704,7 @@ class ColumnCollection(util.OrderedProperties): # Allow an aliased column to replace an unaliased column of the # same name. - if self.has_key(column.name): + if column.name in self: other = self[column.name] if other.name == other.key: del self[other.name] @@ -1728,7 +1728,7 @@ class ColumnCollection(util.OrderedProperties): def __contains__(self, other): if not isinstance(other, basestring): raise exceptions.ArgumentError("__contains__ requires a string argument") - return self.has_key(other) + return util.OrderedProperties.__contains__(self, other) def contains_column(self, col): # have to use a Set here, because it will compare the identity |