"Structural pattern matching" for Python, part 2
"Structural pattern matching" for Python, part 2
Posted Sep 9, 2020 13:37 UTC (Wed) by milesrout (guest, #126894)In reply to: "Structural pattern matching" for Python, part 2 by NYKevin
Parent article: "Structural pattern matching" for Python, part 2
And of course there is in also a very easy solution: lambda i=i: i captures i “properly”. Perhaps not very intuitive for beginners, but once you've learnt it you've learnt it.
The LWN site is currently under high scraper load, so comment display has been suppressed for anonymous users. If you are a human, you may read the comments by clicking the button below:
Note: you can avoid this step in the future by logging into your LWN account.
