summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/elements.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/sql/elements.py')
-rw-r--r--lib/sqlalchemy/sql/elements.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/sqlalchemy/sql/elements.py b/lib/sqlalchemy/sql/elements.py
index e253ddb93..ae93eb2a6 100644
--- a/lib/sqlalchemy/sql/elements.py
+++ b/lib/sqlalchemy/sql/elements.py
@@ -2918,15 +2918,15 @@ class Case(ColumnElement):
if "whens" in kw:
util.warn_deprecated_20(
- 'The "whens" argument to case() is now passed as a series of '
- "positional "
- "elements, rather than as a list. "
- )
- whens = kw.pop("whens")
- else:
- whens = coercions._expression_collection_was_a_list(
- "whens", "case", whens
+ 'The "whens" argument to case() is now passed using '
+ "positional style only, not as a keyword argument."
)
+ whens = (kw.pop("whens"),)
+
+ whens = coercions._expression_collection_was_a_list(
+ "whens", "case", whens
+ )
+
try:
whens = util.dictlike_iteritems(whens)
except TypeError: