Closed gambon2010 closed 3 months ago
@gambon2010 Thanks, dude It also will work in oneline if add the brackets like
if (i := self.index_at_distance(d)) < 0:
raise ArithmeticError(
f"Calculated trajectory doesn't reach requested distance {d}"
)
The way the assignment and comparison are combined leads to an incorrect evaluation.
The line is trying to both assign and compare in a single statement, which results in incorrect logic. The assignment should be done separately from the comparison.