summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/util/langhelpers.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2014-08-13 19:45:34 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2014-08-13 19:45:34 -0400
commit7fc08fe89af9760750899346cf81bd74e0d9150f (patch)
treed1a9c485c7795bf33bda15900411aefcec91d193 /lib/sqlalchemy/util/langhelpers.py
parentea85c7053dc9532a95fd487628768fdfc1ca5c30 (diff)
downloadsqlalchemy-7fc08fe89af9760750899346cf81bd74e0d9150f.tar.gz
- The ``info`` parameter has been added to the constructor for
:class:`.SynonymProperty` and :class:`.ComparableProperty`. - The ``info`` parameter has been added as a constructor argument to all schema constructs including :class:`.MetaData`, :class:`.Index`, :class:`.ForeignKey`, :class:`.ForeignKeyConstraint`, :class:`.UniqueConstraint`, :class:`.PrimaryKeyConstraint`, :class:`.CheckConstraint`. fixes #2963
Diffstat (limited to 'lib/sqlalchemy/util/langhelpers.py')
-rw-r--r--lib/sqlalchemy/util/langhelpers.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/sqlalchemy/util/langhelpers.py b/lib/sqlalchemy/util/langhelpers.py
index 8d6fe5a28..828e8f1f3 100644
--- a/lib/sqlalchemy/util/langhelpers.py
+++ b/lib/sqlalchemy/util/langhelpers.py
@@ -435,7 +435,7 @@ def unbound_method_to_callable(func_or_cls):
return func_or_cls
-def generic_repr(obj, additional_kw=(), to_inspect=None):
+def generic_repr(obj, additional_kw=(), to_inspect=None, omit_kwarg=()):
"""Produce a __repr__() based on direct association of the __init__()
specification vs. same-named attributes present.
@@ -484,6 +484,8 @@ def generic_repr(obj, additional_kw=(), to_inspect=None):
output.extend([repr(val) for val in getattr(obj, vargs)])
for arg, defval in kw_args.items():
+ if arg in omit_kwarg:
+ continue
try:
val = getattr(obj, arg, missing)
if val is not missing and val != defval: