It doesn't reassign the 'status' variable, it reassigns the 'not_found" variable.
> Are you sure the second one isn’t just declaring not_found as a stand-in for 404
That's what it looks like, but no, the refactoring really does change an equality test into an assignment.
I would NOT expect for the line “case not_found:” to reassign the status variable to 404 regardless of what it was before.
I can’t see how or why that would be intended behavior.