Feb. 14, 2014
4:22 a.m.
On Fri, Feb 14, 2014 at 2:29 PM, Mathias Panzenböck <grosser.meister.morti@gmx.net> wrote:
Or if "Do something with x" is always the same:
x = expensive_computation_0() or expensive_computation_1() or expensive_computation_2()
if x: # Do something with x...
I would assume that it's not the same... otherwise this method doesn't just obviate the need for comparison-assignment, it also deduplicates a block of code. I think most programmers are smart enough to figure out that that's important :) ChrisA