From 47a48ffcf0443af2b4f6e36614de2bd7d4c6fc24 Mon Sep 17 00:00:00 2001 From: Steve Barnes Date: Thu, 2 Jun 2016 07:11:29 +0100 Subject: [PATCH] DrawXXXList.py: replaced to occurences of dict.has_key(akey) with akey in dict.keys() --- demo/DrawXXXList.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/demo/DrawXXXList.py b/demo/DrawXXXList.py index ad5391ed..f7eb2700 100644 --- a/demo/DrawXXXList.py +++ b/demo/DrawXXXList.py @@ -4,6 +4,7 @@ import random import time import wx +import wx.lib.six as six #---------------------------------------------------------------------- @@ -106,7 +107,7 @@ def makeRandomPens(num, cache): c = random.choice(colours) t = random.randint(1, 4) - if not cache.has_key( (c, t) ): + if not (c, t) in cache.keys(): cache[(c, t)] = wx.Pen(c, t) pens.append( cache[(c, t)] ) @@ -120,7 +121,7 @@ def makeRandomBrushes(num, cache): for i in range(num): c = random.choice(colours) - if not cache.has_key(c): + if not c in cache.keys(): cache[c] = wx.Brush(c) brushes.append( cache[c] )