But in your proposed solution b would be evaluated twice. So you would have to add a new line, think of a new variable name, and so on.
if lower < x.calculate_weight() < upper:
...
Suddenly turns into x_weight = x.calculate_weight()
if lower < x_weight and x_weight < upper:
...