summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2007-08-15 17:28:52 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2007-08-15 17:28:52 +0000
commite02a48ed24ee4548e765c3b2a26e8f20d0d992e2 (patch)
tree2be3666db5d575669ac165878db8e4e74bdb4b7c /lib/sqlalchemy/sql.py
parent2708a3489e342ab9cf64b0aa4ab027b4a45c629f (diff)
downloadsqlalchemy-e02a48ed24ee4548e765c3b2a26e8f20d0d992e2.tar.gz
mass has_key->__contains__ migration, [ticket:738]
Diffstat (limited to 'lib/sqlalchemy/sql.py')
-rw-r--r--lib/sqlalchemy/sql.py4
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