You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This matrix defines the current compatibility baseline for multilingual.
Baseline source of truth:
examples/complete_features_en.ml
tests/ (1787 tests across 130+ test suites, 2 skipped)
Target runtime:
CPython 3.12.x
Scope Statement
multilingual supports a broad Python 3.12-aligned syntax/runtime subset, but
it is not full drop-in compatibility for every existing Python project and
third-party ecosystem.
Supported Languages
17 natural languages are supported with localized keywords and error messages:
declares global scope; defines name in local scope
nonlocal
Supported
declares enclosing scope; defines name in local scope
del
Supported
del variable
Comprehensions and Generators
Area
Status
Notes / Example
List comprehensions
Supported
[x for x in items if cond], nested clauses
Dict comprehensions
Supported
{k: v for k, v in items}
Set comprehensions
Supported
{x for x in items if cond}, nested clauses
Generator expressions
Supported
(x for x in items)
Context Managers
Area
Status
Notes / Example
with statement
Supported
with open(f) as h:
Multiple contexts
Supported
with A() as a, B() as b:
async with
Supported
async context managers
Keyword and Built-in Coverage Status
Coverage area
Status
Notes
Python keywords (3.12)
Complete
51 concept IDs across 7 categories in keyword registry
Universal built-in functions
70+ available
len, range, abs, pow, divmod, complex, format, ascii, compile, eval, exec, globals, locals, issubclass, delattr, slice, aiter, anext, and more
Exception types
45+ available
BaseException, KeyboardInterrupt, ValueError, TypeError, KeyError, ModuleNotFoundError, ExceptionGroup, BaseExceptionGroup, all warning subclasses, and more
Special values
Available
True, False, None, Ellipsis, NotImplemented
Localized built-in aliases
41 concepts
range, len, sum, abs, min, max, sorted, reversed, enumerate, map, filter, isinstance, type, input, any, all, round, pow, hash, callable, iter, next, chr, ord, repr, dir, format, frozenset, bytes, divmod, issubclass, hasattr, getattr, setattr, delattr, and more — each with aliases across all 16 non-English languages
Canonical Python built-in names
Fully available
Canonical names (e.g., len, print, super) remain usable across all languages via runtime namespace
Surface Syntax Normalization
SOV (Subject-Object-Verb) and RTL (Right-to-Left) languages can use natural
word order. The surface normalizer rewrites tokens to canonical order before
parsing.
Statement
Languages with normalization
Example (Japanese)
for loop
ja, ar, es, pt, hi, bn, ta
iterable-first: 範囲(6) 内の 各 i に対して:
while loop
ja, ar, hi, bn, ta
condition-first: condition 間:
if statement
ja, ar, hi, bn, ta
condition-first: condition もし:
with statement
ja, ar, hi, bn, ta
expression-first: expression 付き:
WAT/WASM Backend
The WAT code generator (WATCodeGenerator) compiles the multilingual AST directly to
WebAssembly Text (WAT), which is then compiled and executed via Wasmtime.
Feature
Status
Notes
Arithmetic and numeric expressions
Supported
f64 values; +, -, *, /, %, **
Variable declarations and assignments
Supported
WAT locals
if / elif / else
Supported
WAT if blocks
while loops
Supported
WAT block/loop/br_if
for loops
Supported
WAT block/loop/br_if with iterator
Function definitions
Supported
Mangled WAT exports
print / print_newline
Supported
Imported host functions
String literals
Supported
Interned in linear memory data section
Class methods (lowering)
Supported
Class__method mangled WAT exports
Stateful OOP — field store (self.attr = val)
Supported
f64.store at compile-time offset
Stateful OOP — field load (self.attr)
Supported
f64.load at compile-time offset
Stateful OOP — constructor allocation
Supported
Bump-pointer heap; $__heap_ptr global
Stateful OOP — instance method calls
Supported
Actual heap pointer passed as self
External obj.attr reads
Supported
When class statically tracked
abs, min, max (n-arg)
Supported
f64.abs, chained f64.min/f64.max for n≥1 args
Stateless utility classes
Supported
f64.const 0 as self, no allocation
Multiple independent instances
Supported
Each constructor call advances heap
Inheritance / method resolution
Supported (single)
Method name table + field layout merged at compile time; parent fields prepended
Dynamic dispatch / polymorphism
Supported
Type tag (class ID) stored at obj_ptr - 8; $__dispatch_method switch per overridden method
super() calls
Supported
Lowered to direct parent WAT function call; super().__init__() and super().method()
@staticmethod / @classmethod
Supported
Detected via decorator; no self pushed at call site
@property
Supported
Getter call emitted on obj.attr access; works with stateful and stateless classes
print with sep= / end=
Supported
Custom separator/terminator interned in data section, printed via $print_str