From afd670942af6838e7715206e54df0d6d664199d7 Mon Sep 17 00:00:00 2001 From: Gendo Ikari Date: Wed, 7 Nov 2012 19:02:57 +0100 Subject: [PATCH] performance fix in widget constructor for event binding --- kivy/uix/widget.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kivy/uix/widget.py b/kivy/uix/widget.py index 0ce503f42..ae3153a4e 100644 --- a/kivy/uix/widget.py +++ b/kivy/uix/widget.py @@ -154,9 +154,9 @@ class Widget(EventDispatcher): # Builder.idmap.pop('root') # Bind all the events - for argument, value in kwargs.items(): - if argument.startswith('on_'): - self.bind(**{argument: value}) + for argument in kwargs: + if argument[:3] == 'on_': + self.bind(**{argument: kwargs[argument]}) # # Collision