Sublime Forum

Support for Pep 635 structural pattern matching


I would like to use the new match / case statements in my python code but the built in Python syntax doesn’t seem to support it. Is there any plug-in or update available to fix this or must I wait for an update? Thanks.



This is supported in Sublime Text 4 (although auto-indent doesn’t work as shown here without a tweak; an issue is probably forthcoming):

Sublime Text 3 doesn’t have this and isn’t going to receive any further updates. To make this work you need an enhanced syntax definition such as the one that ships with ST4.

The syntax from ST4 won’t work in ST3 because it takes advantage of the new syntax engine enhancements in the more recent builds.



It’s prepared, waiting for being released.