diff options
| author | Serhiy Storchaka <storchaka@gmail.com> | 2016-10-25 06:51:38 (GMT) |
|---|---|---|
| committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-10-25 06:51:38 (GMT) |
| commit | f8cc2870f16e386476c6a62c4688a7bdd28dbaad (patch) | |
| tree | d910b8c9e22a7be6b76c3b518ad9aace58a6e4f9 /Tools/scripts/fixcid.py | |
| parent | f10006cdb82a27802ec7c9340e59030712d36f29 (diff) | |
| download | cpython-f8cc2870f16e386476c6a62c4688a7bdd28dbaad.zip cpython-f8cc2870f16e386476c6a62c4688a7bdd28dbaad.tar.gz cpython-f8cc2870f16e386476c6a62c4688a7bdd28dbaad.tar.bz2 | |
Issue #28515: Fixed py3k warnings.
Diffstat (limited to 'Tools/scripts/fixcid.py')
| -rwxr-xr-x | Tools/scripts/fixcid.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Tools/scripts/fixcid.py b/Tools/scripts/fixcid.py index 18b4342..1b461b9 100755 --- a/Tools/scripts/fixcid.py +++ b/Tools/scripts/fixcid.py @@ -242,14 +242,14 @@ def fixline(line): elif found == '*/': Program = OutsideCommentProgram n = len(found) - if Dict.has_key(found): + if found in Dict: subst = Dict[found] if Program is InsideCommentProgram: if not Docomments: print 'Found in comment:', found i = i + n continue - if NotInComment.has_key(found): + if found in NotInComment: ## print 'Ignored in comment:', ## print found, '-->', subst ## print 'Line:', line, @@ -294,7 +294,7 @@ def addsubst(substfile): if not words: continue if len(words) == 3 and words[0] == 'struct': words[:2] = [words[0] + ' ' + words[1]] - elif len(words) <> 2: + elif len(words) != 2: err(substfile + '%s:%r: warning: bad line: %r' % (substfile, lineno, line)) continue if Reverse: @@ -306,7 +306,7 @@ def addsubst(substfile): if key[0] == '*': key = key[1:] NotInComment[key] = value - if Dict.has_key(key): + if key in Dict: err('%s:%r: warning: overriding: %r %r\n' % (substfile, lineno, key, value)) err('%s:%r: warning: previous: %r\n' % (substfile, lineno, Dict[key])) Dict[key] = value |
