"Structural pattern matching" for Python, part 2
"Structural pattern matching" for Python, part 2
Posted Sep 2, 2020 14:19 UTC (Wed) by tnemeth (guest, #37648)In reply to: "Structural pattern matching" for Python, part 2 by NAR
Parent article: "Structural pattern matching" for Python, part 2
Indeed. I discussed this issue with a friend who has developed in Scala. He told me that in what he understood from the article -- and what I completely missed -- is that if I want error reporting, I may simply have to use
case x:
print("error: ", str(x))
an not use the `_` (which isn't meant to be used).
