3 ms·
They do two entirely different things in python. Occasionally you might actually want the functionality of the first statement, but if you write the first stat
by dagw 13y ago
They do two entirely different things in python. Occasionally you might actually want the functionality of the first statement, but if you write the first statement and expect it to do the same as the second statement, then that is a bug in your code.
You could argue that the python is badly designed in this case and that the two should be equivalent, but that's a different argument.