From 3a3abaa8aa9d6a7504ed903ff3c3ae28ae6bc5e6 Mon Sep 17 00:00:00 2001 From: "Edwin Marshall (aspidites)" Date: Mon, 11 Jun 2012 01:19:35 -0700 Subject: [PATCH] - updated check for unicode key in kwargs; semantically makes more sense though end result is the same as before; such a simple change makes it easier to read --- kivy/core/window/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kivy/core/window/__init__.py b/kivy/core/window/__init__.py index e549a1926..3b4e912d7 100755 --- a/kivy/core/window/__init__.py +++ b/kivy/core/window/__init__.py @@ -760,7 +760,7 @@ class WindowBase(EventDispatcher): .. warning:: Some providers may omit `scancode`, `codepoint` and/or `modifier`! ''' - if kwargs.get('unicode'): + if 'unicode' in kwargs: warn("The use of the unicode parameter is deprecated, and will be " "removed in future versions. Use codepoint instead, which " "has identical semantics.") @@ -769,7 +769,7 @@ class WindowBase(EventDispatcher): def on_key_down(self, key, scancode=None, codepoint=None, modifier=None, **kwargs): '''Event called when a key is down (same arguments as on_keyboard)''' - if kwargs.get('unicode'): + if 'unicode' in kwargs: warn("The use of the unicode parameter is deprecated, and will be " "removed in future versions. Use codepoint instead, which " "has identical semantics.") @@ -777,7 +777,7 @@ class WindowBase(EventDispatcher): def on_key_up(self, key, scancode=None, codepoint=None, modifier=None, **kwargs): '''Event called when a key is up (same arguments as on_keyboard)''' - if kwargs.get('unicode'): + if 'unicode' in kwargs: warn("The use of the unicode parameter is deprecated, and will be " "removed in future versions. Use codepoint instead, which " "has identical semantics.")