Domain Specific Languages Embedded in Python

metadsl inserts a layer between calling a function and computing its result, so that we can build up a bunch of calls, transform them, and then execute them all at once.

from __future__ import annotations

def __add__(self, other: Number) -> Number:
...

@classmethod
def from_int(cls, i: int) -> Number:
...