- 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
This commit is contained in:
Edwin Marshall (aspidites) 2012-06-11 01:19:35 -07:00
parent d3018f304c
commit 3a3abaa8aa
1 changed files with 3 additions and 3 deletions

View File

@ -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.")