GOTCHA : "Support" here does not mean bug free.
Feature
treewalk
bytecode VM
Integer expressions
✅
✅
String literals
✅
✅
Boolean operators
✅
✅
Comparison operators
✅
✅
Logical operators
✅
✅
Variable assignment
✅
✅
Comments
✅
✅
REPL
✅
✅
Error handling
✅
✅
Control flow statements
✅
✅
Function defintion and function calls
✅
✅
Class definition, instatiation, and method calls
✅
✅
Lexical scoping
✅
✅
Module imports
✅
🔄
Floating point
✅
✅
Negative numbers
✅
✅
Stack traces
✅
✅
Lists
✅
✅
List comprehension
✅
Sets
✅
Set comprehension
✅
Dictionaries
✅
Dict comprehension
✅
Iterables
✅
✅
Tuples
✅
✅
Ranges
✅
✅
Generator functions
✅
✅
yield from
✅
✅
Index access
✅
✅
Slices
✅
Inheritance
✅
Operator overloading
✅
Object creation and metaclasses
✅
async/await
✅
✅
Try-except blocks
✅
Args and kwargs
✅
Closures
✅
✅
Decorators
✅
✅
Descriptor protocol
✅
Context managers
✅
Compound assignment (+=) for integers
✅
Comparison operator chaining
✅
✅
Unpacking assignment
✅
✅
Multiple assignment
✅
f-strings (without escape characters)
✅
✅
Class variables, class methods, and static methods
✅
Type hints (without enforcement)
✅
Exception groups
✅
Assignment expressions (:=)
async with and async for
Async generators
Regular expressions
Garbage collection
Threading
Match-case statements
Monkey patching
builtin
treewalk
bytecode VM
abs
aiter
all
anext
any
ascii
bin
bool
✅
✅
breakpoint
bytearray
✅
bytes
✅
callable
✅
chr
classmethod
✅
compile
complex
✅
delattr
dict
✅
dir
✅
divmod
enumerate
eval
exec
filter
float
✅
format
frozenset
✅
getattr
✅
globals
✅
hasattr
hash
✅
help
hex
id
input
int
✅
✅
isinstance
✅
issubclass
✅
iter
✅
✅
len
✅
list
✅
✅
locals
map
max
memoryview
✅
min
next
✅
✅
object
✅
oct
open
ord
pow
print
✅
✅
property
✅
range
✅
✅
repr
reversed
✅
round
set
✅
setattr
✅
slice
✅
sorted
✅
staticmethod
✅
str
✅
sum
super
✅
tuple
✅
✅
type
✅
vars
zip
✅
__import__
Python Reference
The Memphis lexer supports all Python keywords.
keyword
supported?
True
✅
None
✅
False
✅
and
✅
as
✅
assert
✅
async
✅
await
✅
break
✅
class
✅
continue
✅
def
✅
del
✅
elif
✅
else
✅
except
✅
finally
✅
for
✅
from
✅
global
✅
if
✅
import
✅
in
✅
is
✅
lambda
✅
nonlocal
✅
not
✅
or
✅
pass
✅
raise
✅
return
✅
try
✅
while
✅
with
✅
yield
✅
Python Reference
Dunder Methods and Attributes
method
treewalk
bytecode VM
Object Creation and Destruction
__new__(cls, [...])
✅
__init__(self, [...])
✅
__del__(self)
Representation
__repr__(self)
__str__(self)
__hash__(self)
✅
__format__(self, format_spec)
Comparison and Equality
__eq__(self, other)
✅
__ne__(self, other)
✅
__lt__(self, other)
✅
__le__(self, other)
✅
__gt__(self, other)
✅
__ge__(self, other)
✅
Numeric Operators
__add__(self, other)
✅
__sub__(self, other)
✅
__mul__(self, other)
✅
__truediv__(self, other)
✅
__floordiv__(self, other)
✅
__mod__(self, other)
✅
__divmod__(self, other)
__pow__(self, other[, modulo])
✅
__lshift__(self, other)
✅
__rshift__(self, other)
✅
__and__(self, other)
✅
__or__(self, other)
✅
__xor__(self, other)
✅
Unary Operators and Functions
__neg__(self)
__pos__(self)
__abs__(self)
__invert__(self)
Type Conversion
__int__(self)
__float__(self)
__complex__(self)
__bool__(self)
Container Types
__len__(self)
__getitem__(self, key)
✅
__setitem__(self, key, value)
✅
__delitem__(self, key)
✅
__iter__(self)
__reversed__(self)
__contains__(self, item)
✅
Attribute Access
__getattr__(self, name)
__getattribute__(self, name)
__setattr__(self, name, value)
__delattr__(self, name)
Descriptors
__get__(self, instance, owner)
✅
__set__(self, instance, value)
✅
__delete__(self, instance)
✅
Callable Objects
__call__(self, [...])
Context Managers
__enter__(self)
✅
__exit__(self, exc_type, exc_value, traceback)
✅
Instance Creation and Destruction (for classes)
__init_subclass__(cls)
__instancecheck__(self, instance)
__subclasscheck__(self, subclass)
Metaclass Methods
__prepare__(cls, name, bases)
__class_getitem__(cls, item)
Customizing Module Import
__path__(self)
__loader__(self)
__package__(self)
__spec__(self)
This list is a subset of the full spec found at the Python Reference .