From d0b8233c9ac8cc28b3c04e45088b6410a61da71e Mon Sep 17 00:00:00 2001 From: Daniel Pavel Date: Sun, 7 Jul 2013 21:40:55 +0200 Subject: [PATCH] minor clean-up --- lib/logitech/unifying_receiver/common.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/logitech/unifying_receiver/common.py b/lib/logitech/unifying_receiver/common.py index af6c0837..3a726b3d 100644 --- a/lib/logitech/unifying_receiver/common.py +++ b/lib/logitech/unifying_receiver/common.py @@ -13,12 +13,7 @@ try: _unpack_str = unpack pack = lambda x, *args: _pack_str(str(x), *args) unpack = lambda x, *args: _unpack_str(str(x), *args) -except: - pass -try: - unicode - # this is certanly Python 2 is_string = lambda d: isinstance(d, unicode) or isinstance(d, str) # no easy way to distinguish between b'' and '' :( # or (isinstance(d, str) \ @@ -30,6 +25,9 @@ except: # In Py3, unicode and str are equal (the unicode object does not exist) is_string = lambda d: isinstance(d, str) +# +# +# class NamedInt(int): """An reqular Python integer with an attached name.