C-style `switch` statement implementation using decorators
I wish I had enough practice with decorators to be able to comment on most of this. I've never really needed to play with them, so I've kind of neglected them beyond simple memoization toys. This looks pretty cool, but I think all I can comment on are a few things along with the low-hanging PEP fruit since no-ones jumped on that yet :)

len(closure)-1


This should have spaces in there:


  Always surround these binary operators with a single space on either side: assignment (=), augmented assignment (+=, -= etc.), comparisons (==, &lt;, >, !=, &lt;>, &lt;=, >=, in, not in, is, is not), Booleans (and, or, not).


It doesn't explicitly mention -, but the "No:" examples after that bit above suggest that it should use spaces as well.

And on the other end,

test = op.eq


Shouldn't use spaces (from the link above again):


  Don't use spaces around the = sign when used to indicate a keyword argument, or when used to indicate a default value for an unannotated function parameter.




break_ doesn't need a return None in there. That's implicit.



Some of what you're documenting with doc-strings could be documented in other arguably cleaner ways.

For example, in switch_construct you have:

* The dictionary contains two keys: "control" and "halt".
          - "control": the value governing the current switch instance. `case` blocks are tested against this value.
          - `halt`: value is used to implement break functionality. 
            &gt; `True`: break after execution of current function.
            &gt; Default: `False`.


You have a dictionary that should only take on certain keys. This sounds more like a job for a dataclass instead of a dictionary:

from dataclasses import dataclass

@dataclass
class SwitchMetadata:
    """- "control": the value governing the current switch instance. `case` blocks are tested against this value.
       - `halt`: value is used to implement break functionality.
    """

    control: str
    halt: bool = False  # Makes the constructor allow halt to default to False

. . .

closure.append(SwitchMetadata(input_))

. . .

if test(value, closure[index].control) and not closure[index].halt

. . .

closure[enclosing.switch_index].halt = True


This gets rid of the need for string dictionary lookups and gives some type safety. Both of these decrease the chance you'll make silly typos since both allow for static checking by the IDE. The class definition also clearly communicates to the reader what the structure holds and what types the data should be.