summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/operators.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/sql/operators.py')
-rw-r--r--lib/sqlalchemy/sql/operators.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/sqlalchemy/sql/operators.py b/lib/sqlalchemy/sql/operators.py
index 88f56e5ec..7513c0b82 100644
--- a/lib/sqlalchemy/sql/operators.py
+++ b/lib/sqlalchemy/sql/operators.py
@@ -310,6 +310,11 @@ class ColumnOperators(Operators):
"""
return self.operate(neg)
+ def __iter__(self):
+ """Block calls to list() from calling __getitem__() endlessly."""
+
+ raise NotImplementedError("Class %s is not iterable" % self.__class__)
+
def __getitem__(self, index):
"""Implement the [] operator.