basedpython language reference¶
basedpython is a Python-like language that transpiles to pure Python
getting started¶
tools¶
by and buff are available when the basedpython package is installed
runtime compatibility¶
project-level features¶
basedpython language features¶
- tuple type literals
- callable arrow syntax
- intersection types
- negation types (
not T) typeofkeyword- star projections (
X[*]) - strict
floatandcomplex - literal type promotion
- typed dict literals
- anonymous named tuple types
- explicit typevar constraints
- typevar variance keywords
- explicit generic call sites
- automatic forward references
- implicit typing imports
- typed lambda
- implicit overload stubs
- decorator keyword
- type narrowing predicates
- generics
syntax extensions¶
- modifiers and visibility
- init method shorthand
- empty declarations
- identity and isinstance (
===/!==/is) - optional chaining (
?.) - none-coalesce operator (
??) - mutable default arguments
- dedented triple-quoted strings
- tuple member access (
expr.N) - keyword arguments in subscripts
- unpack syntax
- super keyword
castkeywordsentineldeclarations- lazy imports
- repeated
_parameters