No, I mean the `if` clause should be written as `if step is not None and step[k]:` (idiomatic Python ;).