Replace "x.has_key(y)" with "y in x" where covered by tests
|Reported by:||Vladimir Perić||Owned by:||Vladimir Perić|
branch-diff, diff-cov, branch-cov, buildbot
The dict.has_key(k) syntax is deprecated (and completely gone by Python 3) in favor of "k in dict". Ticket #4053 attempted to fix this, but was stalled due to making many untested changes (though these are all trivial). As such, I've decided to take a different approach: this ticket only fixes the lines covered by the tests suite. I determined this by running the test suite with the "-3" option, and then checking each line individually.