From: Eric Sunshine Date: Tue, 19 Jun 2018 08:15:11 GMT Subject: Re: [PATCH 2/6] git-p4: python3: replace dict.has_key(k) with "k in dict" Message-ID: In-Reply-To: <20180619080411.6554-3-luke@diamand.org> On Tue, Jun 19, 2018 at 4:04 AM Luke Diamand wrote: > Python3 does not have the dict.has_key() function, so replace all > such calls with "k in dict". This will still work with python2.6 > and python2.7. > > Converted using 2to3 (plus some hand-editing) > > Signed-off-by: Luke Diamand > --- > diff --git a/git-p4.py b/git-p4.py > @@ -3141,7 +3141,7 @@ def importP4Labels(self, stream, p4Labels): > - if change.has_key('change'): > + if 'change' in change: Very existential. All these changes look sensible (as one might expect from automated conversion).