summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/util.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2010-07-24 13:19:59 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2010-07-24 13:19:59 -0400
commit8a7ae371535342bb35491d59aaa1131ba7c435fa (patch)
tree23794b40afd01c275a2831361c19a02bd4cd388e /lib/sqlalchemy/util.py
parent8e0618aa650c43b483dbae443ddca94fcdd5b945 (diff)
downloadsqlalchemy-8a7ae371535342bb35491d59aaa1131ba7c435fa.tar.gz
- initial "events" idea. will replace all Extension, Proxy, Listener
implementations with a single interface.
Diffstat (limited to 'lib/sqlalchemy/util.py')
-rw-r--r--lib/sqlalchemy/util.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/sqlalchemy/util.py b/lib/sqlalchemy/util.py
index ae45e1703..73e2533ce 100644
--- a/lib/sqlalchemy/util.py
+++ b/lib/sqlalchemy/util.py
@@ -636,6 +636,11 @@ def assert_arg_type(arg, argtype, name):
"Argument '%s' is expected to be of type '%s', got '%s'" %
(name, argtype, type(arg)))
+def adapt_kw_to_positional(fn, *args):
+ def call(**kw):
+ return fn(*[kw[a] for a in args])
+ return call
+
_creation_order = 1
def set_creation_order(instance):
"""Assign a '_creation_order' sequence to the given instance.