summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/util/langhelpers.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/util/langhelpers.py')
-rw-r--r--lib/sqlalchemy/util/langhelpers.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqlalchemy/util/langhelpers.py b/lib/sqlalchemy/util/langhelpers.py
index ac6b50de2..7f57e501a 100644
--- a/lib/sqlalchemy/util/langhelpers.py
+++ b/lib/sqlalchemy/util/langhelpers.py
@@ -969,7 +969,7 @@ def coerce_kw_type(kw, key, type_, flexi_bool=True):
kw[key] = type_(kw[key])
-def constructor_copy(obj, cls, **kw):
+def constructor_copy(obj, cls, *args, **kw):
"""Instantiate cls using the __dict__ of obj as constructor arguments.
Uses inspect to match the named arguments of ``cls``.
@@ -978,7 +978,7 @@ def constructor_copy(obj, cls, **kw):
names = get_cls_kwargs(cls)
kw.update((k, obj.__dict__[k]) for k in names if k in obj.__dict__)
- return cls(**kw)
+ return cls(*args, **kw)
def counter():