Skip to content

features

the basedpython language reference — one page per feature, each with the surface syntax, what it checks, and the python it lowers to

new here?

getting started installs by and walks a .by file through to running python. this page is the reference you come back to

python compatibility

.by is not a superset of .py

runtime compatibility

what the transpiled python does at runtime, beyond what you wrote

project-level

features that apply to a project rather than to a file

standard library

what basedpython's vendored typeshed says that upstream's does not

  • typeshed improvements — covariant mapping keys, honest re groups, precise functools.cache, and the rest

enhancements that also apply to python

type-checking improvements with no new syntax — they work in .by and .py files alike

type system

what a type is allowed to say

generics

type parameters — their bounds, their variance, and what survives to runtime

declarations

the forms a class, function or binding can take

expressions and statements

syntax inside a function body

formatting

how the formatter lays basedpython out