The real purpose of Pythons match statement feat CSTs
>> YOUR LINK HERE: ___ http://youtube.com/watch?v=ASRqxDGutpA
What's the purpose of the match statement in Python? • The match statement is commonly mistaken for being Python's way of adding a switch-case statement. NOPE! This is not the intended purpose of the match statement, and it does not have similar performance benefits. Let's see what the match statement is REALLY for by parsing concrete syntax trees (CSTs). • ― mCoding with James Murphy (https://mcoding.io) • Source code: https://github.com/mCodingLLC/VideosS... • libcst: https://libcst.readthedocs.io/en/late... • AST linting vid: • Python AST Parsing and Custom Linting • Structural pattern matching vid: • The Hottest New Feature Coming In Pyt... • SUPPORT ME ⭐ • --------------------------------------------------- • Patreon: / mcoding • Paypal: https://www.paypal.com/donate/?hosted... • Other donations: https://mcoding.io/donate • Top patrons and donors: Jameson, Laura M, Dragos C, Vahnekie, John Martin, Casey G • BE ACTIVE IN MY COMMUNITY 😄 • --------------------------------------------------- • Discord: / discord • Github: https://github.com/mCodingLLC/ • Reddit: / mcoding • Facebook: / james.mcoding • CHAPTERS • --------------------------------------------------- • 0:00 Intro • 0:20 Switch case? • 2:52 ASTs and CSTs • 4:14 True, True, True • 4:46 Visiting the CST • 5:50 Matching the CST • 7:50 Addressing complexity
#############################
