mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
SF 563203. Replaced 'has_key()' with 'in'.
This commit is contained in:
parent
9d5e4aa414
commit
54f0222547
54 changed files with 243 additions and 222 deletions
|
@ -321,7 +321,7 @@ class SequenceMatcher:
|
|||
junkdict[elt] = 1
|
||||
del d[elt]
|
||||
|
||||
# Now for x in b, isjunk(x) == junkdict.has_key(x), but the
|
||||
# Now for x in b, isjunk(x) == x in junkdict, but the
|
||||
# latter is much faster. Note too that while there may be a
|
||||
# lot of junk in the sequence, the number of *unique* junk
|
||||
# elements is probably small. So the memory burden of keeping
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue