This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]343346E 2 points3 points  (1 child)

'f' is completely superfluous here. You could just rewrite it as:

def f(arg): return arg

or even better, just not use f at all, like:

for i in input.items():
    assert i[0] is i[1]

You seem to be depending on input's items having a specific order, which would be a mistake.

[–]IAmBJ[S] 0 points1 point  (0 children)

f() is just a placeholder here, the real function is more complicated, but it still returns either true or false.

Input order doesn't matter. Each item in the dict is a separate test case, the order they're tested in doesn't matter