While I initially thought this was absurd, looking at the intended use case I think this is actually sensible behavior. While I would probably use a word other than case to further distinguish it from the switch statements of other languages, the fact remains it's not a switch statement, and assigning values to variables is the whole point.<p>In the article's example, copied below, the programmer is confident that the status code fits the format they are looking for but not what status code corresponds to not found<p><pre><code> NOT_FOUND = 404
match status_code:
case 200:
print("OK!")
case NOT_FOUND:
print("HTTP Not Found")
</code></pre>
This should be handled by an elif statment. If on the other hand we're dealing with<p><pre><code> match ambiguous_response:
case status_code:
print("Responded with status code: ",status_code)
case { "status_code" : status_code , _ }:
print("Responded with json obj containing status code: ",status_code)
</code></pre>
doing so with elif statements would be cumbersome at best.