summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/elements.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2014-07-14 21:11:16 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2014-07-14 21:11:51 -0400
commitdbc8bbfba3591d2ea704673d90e95014765d0f10 (patch)
tree274df91b7f0217d8bff7b8d9f3e6e4d6bd6365a0 /lib/sqlalchemy/sql/elements.py
parentd2193f53c10d29a7a9b1846ebf322fbced55041f (diff)
downloadsqlalchemy-dbc8bbfba3591d2ea704673d90e95014765d0f10.tar.gz
- allow the compilation rule that gets the formatted name
to again have the chance to veto rendering, as the naming convention can make the decision that the name is "none" or not now.
Diffstat (limited to 'lib/sqlalchemy/sql/elements.py')
-rw-r--r--lib/sqlalchemy/sql/elements.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql/elements.py b/lib/sqlalchemy/sql/elements.py
index d273d9881..1447787ce 100644
--- a/lib/sqlalchemy/sql/elements.py
+++ b/lib/sqlalchemy/sql/elements.py
@@ -3209,7 +3209,7 @@ class _defer_name(_truncated_label):
"""
def __new__(cls, value):
if value is None:
- return _defer_none_name('_unnamed_')
+ return _NONE_NAME
else:
return super(_defer_name, cls).__new__(cls, value)
@@ -3217,6 +3217,8 @@ class _defer_name(_truncated_label):
class _defer_none_name(_defer_name):
"""indicate a 'deferred' name that was ultimately the value None."""
+_NONE_NAME = _defer_none_name("_unnamed_")
+
# for backwards compatibility in case
# someone is re-implementing the
# _truncated_identifier() sequence in a custom