Given that s = some static value i = a value incremented during a loop
I'm used to comparing them as if i == s: # some code But for some unknown reason I did a switch if s == i: # same code It didn't seem to make any difference at first glance, so I just got to wondering -- Is there a standard for comparison order? Is there any kind of performance difference? Is there even a tradition for one or the other? Are there any gotchas? Do I need to get a hobby? -- http://mail.python.org/mailman/listinfo/python-list