Python structural pattern matching morphs again
Python structural pattern matching morphs again
Posted Dec 10, 2020 17:30 UTC (Thu) by papik (guest, #15175)In reply to: Python structural pattern matching morphs again by mathstuf
Parent article: Python structural pattern matching morphs again
I was thinking... Python already has an assign-ish keyword "as". Maybe it is more pythonic something like:
match ptlike: as Point2d(x, y): return Point3d(x, y, 0)But in my opinion there are too many colons...