From af52a0b58df56b1cb2e6ddd4ad6b41256a717a8e Mon Sep 17 00:00:00 2001 From: Jakub Stasiak Date: Tue, 19 Mar 2013 00:45:44 +0000 Subject: [PATCH] Make compatible with Python 3 (dict.keys is a view) --- injector.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/injector.py b/injector.py index d40e41c..1b4eb7c 100644 --- a/injector.py +++ b/injector.py @@ -734,7 +734,7 @@ def inject(**bindings): def class_wrapper(cls): orig_init = cls.__init__ - original_keys = bindings.keys() + original_keys = tuple(bindings.keys()) for k in bindings: bindings[k.lstrip('_')] = bindings.pop(k)