News for hackers. Stuff that matters.
Re:Why I Still Use Python for High Performance Scientific Co... by andreasvc on Wednesday December 02, 2015 @07:27AM (#10662516)
The easiest is to never use .keys() or .iterkeys(), and always iterate over the bare dict:

    for k in dict:
        ...

    if k in dict:
        ...
If you do need a list of keys, list(dict) has the advantage of working in both Python 2 and 3.

There are no comments on this comment yet.