- Todo: JavaScript bridge & value conversion
- Todo: DOM manipulation APIs
- Todo: Event handling system
- Todo: HTTP requests (fetch API) #35
Modules
Development board
Module development status, from Python parsing to WASM output. Every completed feature is backed by a passing test that checks the compiled program against CPython's answer.
- Completed
- 19 of 26 modules
- In progress
- 4 modules
- Todo
- 3 modules
- Features complete
- 92% 259 of 281
- Done
- In progress
- Todo
- 0.14.0 release that shipped it
- upcoming merged, not yet released
- #5 tracking issue
Todo
Not started yet
- Todo: Promise object representation
- Todo: async/await syntax support #7
- Todo: Asynchronous function execution
- Todo: Concurrent task management
- Todo: Canvas API (2D drawing)
- Todo: WebGL support (3D graphics)
- Todo: Animation & rendering loops
- Todo: Image manipulation & processing
In Progress
Partially implemented
- Completed: Set storage with de-duplication & membership (in / not in) 0.10.0
- Completed: Growable collections - lists and dicts reallocate instead of overflowing their region 0.14.0
- Completed: Dict index assignment with update or append (dict[key] = value) 0.10.0
- Completed: Generator State Management - execution context suspension/resumption 0.14.0
- Todo: Dynamic Module Loading - runtime module loading and execution
- Completed: Closure Variable Capture Analysis - detecting and capturing closure variables 0.14.0
- Completed: String Transformation in WASM - full character-by-char transformations 0.16.0
- Completed: Module constants: math (pi, e, tau, inf, nan), os (name, which is posix as on every CPython WebAssembly host, sep, pathsep, linesep, devnull, curdir, pardir, extsep), re flags, sys.maxsize (2**31 - 1 under 32-bit int), logging levels, datetime.MINYEAR / MAXYEAR 0.8.0
- Completed: sys.argv, and sys.stdin / sys.stdout / sys.stderr: write, flush, read, readline, readlines, and iterating lines, through WASI upcoming
- Completed: sys.exit([status]) raises a catchable SystemExit; one nothing catches exits with its status (an int, 0 for none or None, 1 with the message printed to stderr for anything else) upcoming
- Completed: sys: platform ("wasi", as CPython on WASI reports), version ("3.13.0 (waspy x.y.z)"), path (an empty list: imports are linked at compile time) upcoming
- Completed: os functions on host values, through WASI: environ and getenv() from the host's environment, urandom() from its entropy, getcwd() "/" and getpid() 42 (WASI has neither; wasi-libc's answers, as CPython on WASI gives them) upcoming
- Completed: os.path functions: join(), basename(), dirname(), split(), splitext(), normpath(), abspath(), isabs() as posixpath computes them, and exists(), isfile(), isdir() through the host upcoming
- Completed: math functions on runtime values: sqrt, sin, cos, tan, asin, acos, atan, atan2, sinh, cosh, tanh, exp, log, log10, log2, pow, floor, ceil, trunc, fabs, copysign, fmod, remainder, degrees, radians, hypot, factorial, gcd, isnan, isinf, isfinite, with CPython's domain and range errors; results are musl libm's, bit for bit (CPython on WASI's) upcoming
- Completed: random module, bit-identical to CPython for a seed: random, randint, randrange, uniform, choice, shuffle, sample, seed (an int, bool, float, or None for host entropy), getrandbits, gauss, normalvariate, expovariate upcoming
- Completed: json module: dumps (indent, separators, sort_keys, ensure_ascii, allow_nan), loads into the declared type with CPython's JSONDecodeError, dump, load upcoming
- Todo: json module: JSONEncoder, JSONDecoder, and dumps(default=...) (refused today)
- Completed: re module, compile-time folding: sub and escape over constant arguments, where the pattern is one CPython and the compiler read alike (anything else refused) 0.18.0
- Completed: re module at runtime: compile, search, match, fullmatch, findall, finditer, split, sub, subn, escape, Pattern and Match objects, flags, matched as CPython's sre matches (backtracking, lookarounds, atomic and possessive repeats, conditionals, Unicode classes and case folding) upcoming
- Todo: re module: patterns computed at run time, bytes patterns, \N{name} escapes, Pattern.groupindex, finditer as a lazy iterator (refused today)
- Completed: datetime: date / time / datetime / timedelta construction, each field checked as CPython checks it upcoming
- Completed: datetime: attributes, arithmetic, weekday, isoformat, fromisoformat, strftime, strptime, replace, timestamp, fromtimestamp, timezone, tzinfo, and now() / today() read at run time upcoming
- Completed: collections module: namedtuple and typing.NamedTuple (classes whose fields take their types from the calls), deque, Counter, OrderedDict, defaultdict, ChainMap, each a class specialized by its element types upcoming
- Todo: collections module: UserDict, UserList, UserString (refused today)
- Completed: itertools module: count, cycle, repeat, chain, compress, dropwhile, filterfalse, groupby, islice, starmap, takewhile, tee, zip_longest, product, permutations, combinations, combinations_with_replacement, accumulate, batched, pairwise, lowered to generators (tee and zip_longest over sequences) upcoming
- Completed: functools: @singledispatch with @f.register (static dispatch on the first argument's type), @total_ordering (derives the missing ordering methods) 0.17.0
- Completed: functools: @lru_cache, @cache, @wraps (accepted, no observable effect) 0.17.0
- Completed: functools: reduce, partial, partialmethod, cmp_to_key, cached_property, singledispatchmethod (lru_cache's cache_info() and cache_clear() refused) upcoming
- Completed: logging module: getLogger and the logger hierarchy, debug, info, warning, error, critical, log, basicConfig, setLevel, disable, Logger, Handler, StreamHandler, FileHandler, NullHandler, Formatter (the %, {, and $ styles), Filter, LogRecord, with each record's line and function upcoming
- Todo: logging module: exception() and exc_info (a traceback in the record), extra=, addLevelName, logging.config, logging.handlers (refused today)
- Completed: Import statement parsing & IR generation 0.8.0
- Completed: From-import with named imports 0.8.0
- Completed: Star imports detection (from X import *) 0.8.0
- Completed: Conditional imports in try/except blocks 0.8.0
- Todo: Dynamic imports (__import__, importlib) (refused at compile time today)
- Completed: Module execution and loading 0.8.0
- Completed: User-defined module files - import mod / from mod import f resolved from sibling .py files and statically linked 0.14.0
- Completed: Namespace access on user modules (mod.f(), mod.CONST, mod.ClassName()) and aliases (import mod as m, from mod import f as g) 0.14.0
- Completed: Module caching - a module imported through several paths compiles once 0.14.0
- Completed: Bump allocator with runtime memory growth 0.12.0
- Completed: Collections carry a capacity and reallocate instead of overflowing their region 0.14.0
- Completed: Pointer identity across growth (a grown collection visible through every alias) 0.15.0
- Todo: Garbage collection system
- Todo: Reference counting & leak prevention
- Todo: Memory pools for efficient allocation
- Todo: Bounded memory: a long-running loop that builds and drops collections stays within a fixed number of pages
Completed
Fully implemented and tested
- Completed: All operators (+, -, *, /, %, //, **) 0.1.0
- Completed: / is true division and yields a float, // is floor division (Python 3 semantics) 0.16.0
- Completed: Type coercion (int/float) 0.1.0
- Completed: Bitwise operations (&, |, ^, <<, >>, ~) 0.1.0
- Completed: Unary operations (-, +, not) 0.1.0
- Completed: Integer // and % floor as Python does (they truncated for mixed-sign operands) 0.18.0
- Completed: Augmented assignment shares the plain operators (string +=, /=, float %=, floored %= and //=) 0.18.0
- Completed: if/elif/else statements 0.1.0
- Completed: while loops 0.1.0
- Completed: for loops with list/string iteration 0.7.0
- Completed: break and continue in loops 0.11.0
- Completed: try/except/finally blocks with real exception propagation (see EXCEPTION HANDLING) 0.7.0
- Completed: with statements over user context managers (__enter__/__exit__, nested, inherited, exit before return / break / continue) #5 0.14.0
- Completed: Comparison operations (==, !=, <, <=, >, >=) 0.1.0
- Completed: Boolean logic (and, or, not) with short-circuit 0.1.0
- Completed: else clauses on for, while, and try 0.18.0
- Completed: Conditional expressions (a if cond else b), evaluating only the arm taken upcoming
- Completed: Function definitions with parameters 0.1.0
- Completed: Type annotations (params & return types) 0.1.0
- Completed: Function calls between compiled functions 0.1.0
- Completed: Multiple functions per module 0.1.0
- Completed: Keyword arguments in calls to functions and constructors, placed by name with defaults filled in 0.18.0
- Completed: An unannotated parameter or return takes ints, bools, and None; a string, float, collection, or instance through one is refused 0.18.0
- Completed: Nested function definitions (def inside def), typed by their annotations, closing over the enclosing variables, called directly or as values upcoming
- Completed: *args collects extra positional arguments as a tuple, typed by its annotation; f(*xs) passes a sequence on upcoming
- Completed: Keyword-only parameters, after *, passed by name with their defaults upcoming
- Completed: **kwargs collects extra keyword arguments as a dict keyed by name upcoming
- Completed: Basic types: int (32-bit two's complement, wraps on overflow rather than growing like CPython's), float (IEEE-754 double), bool 0.1.0
- Completed: Generic types (List[T], Dict[K,V], Tuple[T,...]) 0.1.0
- Completed: Union/Optional types 0.1.0
- Completed: Optional numbers: None distinct from 0 (an Optional[int], Optional[bool], or Optional[float] is boxed), is None, arithmetic and ordering raising CPython's TypeError on None, ==, truthiness, str(), and dict.get(key) on number values upcoming
- Completed: Custom class type annotations 0.1.0
- Completed: Unannotated locals typed from the value: collection element types, c = C() as an instance, a method call's declared return type 0.14.0
- Completed: Variable declarations and assignments 0.1.0
- Completed: Augmented assignment (+=, -=, *=, etc.) 0.1.0
- Completed: Attribute assignment (obj.attr = value) 0.1.0
- Completed: Type inference from usage 0.1.0
- Completed: Module-level definitions evaluated once at instantiation and shared (start function + globals) 0.18.0
- Completed: Class-level variables shared by the class 0.18.0
- Completed: Tuple unpacking types its targets; a wrong-length value raises ValueError 0.18.0
- Completed: Augmented assignment through subscripts and computed objects, each target evaluated once 0.18.0
- Completed: Annotated fields: self.items: Dict[str, Item] = {} 0.18.0
- Completed: A module-level statement that would not run (a loop, a call, an augmented assignment) is refused 0.18.0
- Completed: global: a function rebinds a module-level name for every reader upcoming
- Completed: del of a list index or slice and of a dict key (IndexError / KeyError when absent) upcoming
- Completed: nonlocal: a nested function rebinds a variable of the function enclosing it upcoming
- Completed: Standard decorators applied: @staticmethod, @classmethod, @property / @x.setter, @abstractmethod, @dataclass, and the functools decorators (see their cards) 0.17.0
- Completed: Unimplemented decorators are refused (functions, methods, and classes) instead of being silently dropped 0.17.0
- Completed: Decorators CPython does not define (@memoize, @timer, @debug, @pure, @wasm_export, ...) are refused, as CPython raises NameError 0.18.0
- Completed: User-written decorators applied at definition time: wrappers forwarding *args and **kwargs (with keyword arguments at the call), state the wrapper keeps through nonlocal (one per decorated function), decorator factories (@repeat(3)), stacked decorators, decorators that register and return the function, fn.__name__, and @functools.wraps upcoming
- Completed: Multi-file compilation to single WASM 0.5.0
- Completed: Dependency analysis & circular detection 0.5.0
- Completed: Entry point detection (__main__.py) 0.5.0
- Completed: Config parsing (setup.py, pyproject.toml) 0.5.0
- Completed: WebAssembly optimization (Binaryen) 0.1.0
- Completed: Compiler options & configuration (reviewed API: optimize + verbosity) 0.14.0
- Completed: Error handling with located messages (line/column, function, hints) 0.14.0
- Completed: A call to an undefined function, or an attribute read through an untyped value, is a compile error instead of answering 0 0.17.0
- Completed: Early validation - unsupported syntax rejected before codegen 0.14.0
- Completed: A parse or lowering failure fails the build naming the file, rather than skipping it with a warning 0.16.0
- Completed: Integration test suite - every example compiled, run, and asserted in CI 0.14.0
- Completed: End-to-end programs asserted under Node and wasmtime, optimized and unoptimized, as a CI gate 0.16.0
- Completed: Comment preservation - python.comments custom section, survives optimization 0.14.0
- Completed: Memory layout: equal string and bytes literals share one blob in the data segment 0.1.0
- Completed: String literals, indexing, slicing, concatenation 0.3.0
- Completed: Case conversion (upper, lower, capitalize, title) 0.3.0
- Completed: Case conversion, the is* predicates, strip, and split over the whole of Unicode, as CPython maps and classifies it (final sigma, titlecase, ß to SS, CPython's whitespace), on literals and runtime strings alike upcoming
- Completed: A str is a sequence of code points: len, indexing, slicing with any step, find and index, padding, iteration, and comprehensions count characters, not UTF-8 bytes upcoming
- Completed: Test methods (isdigit, isalpha, isspace, etc.), folded at compile time on a literal receiver 0.3.0
- Completed: Search methods (.find, .count, .startswith, .endswith) 0.3.0
- Completed: Transform methods (.split, .join, .replace) 0.3.0
- Completed: A method on a literal receiver answers what the same method on a variable does, .split(sep) included 0.16.0
- Completed: Layout methods (.ljust, .rjust, .center) 0.3.0
- Completed: % formatting - compile-time for constants: %s %r %d %i %x %X %o %f with flags, width, and precision (rendered as written, or in decimal for %x, before; anything else is refused) 0.18.0
- Completed: % formatting on runtime values ("%d" % n), every conversion, flags, width, precision, %(key) mappings, and a tuple operand upcoming
- Completed: Repetition: s * n and n * s 0.18.0
- Completed: Every string method works on a runtime receiver, not only a literal (case, trim, search, split/join, replace, layout, predicates) 0.16.0
- Completed: .format() interpolates runtime values - automatic {} and positional {0} fields 0.16.0
- Completed: .format() named fields, attribute and index lookups ({0.x}, {1[2]}, {2[k]}), format specs with nested fields, and !r / !s / !a conversions upcoming
- Completed: Strings compare by content everywhere, so a key built at runtime matches an equal one (dict keys, in over lists and sets) 0.16.0
- Completed: sub in text searches the string 0.16.0
- Completed: F-strings - constant placeholders folded into the literal 0.3.0
- Completed: F-strings - dynamic interpolation (every placeholder rendered and concatenated) 0.15.0
- Completed: F-string fixed-point specifier f"{value:.2f}" 0.16.0
- Completed: F-strings: the full format spec (fill, alignment, sign, z, #, 0, width, grouping, precision, every type letter), nested {x:{w}.{p}f} specs, and !r / !s / !a conversions, digit for digit with CPython upcoming
- Completed: String ordering (<, <=, >, >=) and identity (is) 0.18.0
- Completed: s[i] is a real one-character string wherever it goes 0.18.0
- Completed: for ch in s iterates characters 0.18.0
- Completed: List literals with memory allocation [1, 2, 3] 0.7.0
- Completed: List indexing (read & write) list[i] and list[i] = value 0.7.0
- Completed: A literal mixing element types no one type holds ([1, "a"], {"n": "bob", "age": 30}) is refused instead of reading the others back as the first; [[], [1]] and tuples of one shape unify upcoming
- Completed: List methods .append(), .pop([i]), .clear(), .insert(i, v) 0.7.0
- Completed: .remove(v) drops the first equal element; a missing value raises a catchable ValueError 0.18.0
- Completed: .pop(i) removes the element at i and .index(v) answers its position; a missing value or position traps, as Python raises 0.16.0
- Completed: A method called with the wrong number of arguments is a compile error, not a silently ignored one 0.16.0
- Completed: List search methods .index(v) & .count(v) with linear search 0.7.0
- Completed: Dict literals with memory allocation {'key': value} 0.7.0
- Completed: Dict indexing (read & write) dict[key] and dict[key] = value 0.7.0
- Completed: Runtime growth: lists reallocate on append/extend/insert, dicts on a new key 0.14.0
- Completed: Iterating a list of instances binds a typed element (for it in items: it.field) 0.14.0
- Completed: Set mutation .add() / .remove() / .discard(), rehashing when the table fills 0.15.0
- Completed: List methods .sort([reverse]) and .reverse(), in place 0.16.0
- Completed: List slicing xs[a:b] returns a fresh list, negative indices and clamping included (a step other than 1 is rejected) 0.16.0
- Completed: Dict methods .get(key, default) (.get(key) on instance values, where None is distinct), .keys(), .values(), .items() - .items() as a value, not only a for iterable 0.16.0
- Completed: in searches dicts and tuples as well as lists and sets; anything unsearchable is a compile error 0.16.0
- Completed: Truthiness follows Python: an empty list, dict, set, or tuple is False 0.16.0
- Completed: A method the compiler does not implement is a compile error rather than a silent no-op 0.16.0
- Completed: Value equality and ordering for tuples and lists (==, !=, <, <=, >, >=) 0.18.0
- Completed: Tuples as set members and dict keys; sets hash strings by content 0.18.0
- Completed: Every evaluation of a collection literal is a new object 0.18.0
- Completed: A tuple subscript (d[(1, 2)]) is an index, not a slice 0.18.0
- Completed: Collection writes convert the value to the element type, or are refused (append, insert, item assignment, dict values, set.add) 0.17.0
- Completed: Sequence repetition: [0] * n and (a,) * n (a tuple's count must be a constant, since its length is part of its type) 0.18.0
- Completed: Concatenation: xs + ys for two lists or two tuples 0.18.0
- Completed: Dict merge: d1 | d2, in CPython's order 0.18.0
- Completed: The rest of the dict API: |=, update, pop, popitem, setdefault, copy, clear, fromkeys upcoming
- Completed: Class definitions with full WASM compilation 0.7.0
- Completed: Instance method definitions with implicit self parameter 0.7.0
- Completed: Object instantiation via constructor calls (ClassName(args)) 0.7.0
- Completed: Automatic __init__ method invocation during construction 0.7.0
- Completed: Method calls with proper dispatch (obj.method()) 0.7.0
- Completed: Instance attribute access getter (obj.attr) 0.7.0
- Completed: Instance attribute assignment setter (obj.attr = value) 0.7.0
- Completed: Per-instance field storage with calculated memory offsets 0.7.0
- Completed: Heap-allocated instances: a distinct pointer per instantiation 0.12.0
- Completed: Multiple live instances of one class with independent state 0.12.0
- Completed: Instances as first-class values (arguments, factory returns) 0.12.0
- Completed: Single inheritance with super().__init__ / super().method() 0.12.0
- Completed: isinstance / issubclass over the class hierarchy 0.12.0
- Completed: @dataclass with generated __init__ / __eq__ / __repr__ 0.12.0
- Completed: Abstract base classes (abc.ABC + @abstractmethod) 0.12.0
- Completed: Collection fields hold instances: self.items = [] filled by append keeps its element class 0.14.0
- Completed: Collection fields grow through the field, so self.items.append(v) is visible to later reads 0.14.0
- Completed: Rich comparisons on instances: <, <=, >, >= call __lt__/__le__/__gt__/__ge__, with reflection 0.17.0
- Completed: Virtual dispatch: a base method calling self.method() reaches the subclass override (methods, @property getters, __eq__) 0.17.0
- Completed: Instances of sibling classes in one list, dict, local, or field dispatch on their own class (typed as the nearest common base) 0.18.0
- Completed: Type conversions (int(), float(), str(), bool()) 0.4.0
- Completed: str() and repr() of every type: floats (shortest round-trip digits), bools, None, quoted and escaped strings and bytes, ranges, nested collections, and instances through __str__ / __repr__ upcoming
- Completed: format() and ascii() builtins upcoming
- Completed: float() of a string, correctly rounded upcoming
- Completed: len() - strings, lists, and dicts 0.7.0
- Completed: len() of a range, and len() of anything without a length refused (TypeError in CPython) 0.18.0
- Completed: isinstance() against builtin types (int, float, str, bool, list, dict, set, tuple, bytes) and tuples of types 0.18.0
- Completed: bool(x) is the truth value (it passed x through, so bool(2) + 1 was 3) 0.18.0
- Completed: print() writes to standard output through WASI: sep, end, file=sys.stderr, flush, every argument through str() after all are evaluated upcoming
- Completed: input([prompt]) reads a line of standard input, writing the prompt first; EOFError at the end of input upcoming
- Completed: min() & max() - multiple arguments, all ints, all floats, or all strings, keeping the first of equals as CPython does 0.18.0
- Completed: min() & max() over a single iterable (a list, tuple, or range), with key= (a lambda, a def, len, abs) and default= #118 upcoming
- Completed: sum() over lists/tuples with optional start value - real element loop 0.14.0
- Completed: sorted(iterable[, key][, reverse]) - stable, over ints, floats, strings, and tuples (a sequence or key whose type cannot be determined is refused, not guessed) 0.16.0
- Completed: int() parses a string, raising ValueError on bad input 0.18.0
- Completed: round(x[, ndigits]) exact, half-to-even, matching CPython 0.18.0
- Completed: abs() 0.18.0
- Completed: List comprehensions ([x for x in list]) 0.14.0
- Completed: List comprehension filters ([x for x in list if condition]) 0.14.0
- Completed: Dict comprehensions ({k: v for k, v in items}) 0.14.0
- Completed: Set comprehensions ({x for x in list}) with dedup at construction 0.14.0
- Completed: Multiple generators & nesting ([x for row in m for x in row]) 0.14.0
- Completed: Generator expressions (x for x in list), materialized eagerly as lists 0.14.0
- Completed: Comprehensions over generators and iterator classes (in the first for clause) 0.18.0
- Completed: Lambda functions (lambda x: x + 1) compiled to real functions 0.14.0
- Completed: Closures capture the variable, not its value: a captured variable lives in a cell the enclosing function and every closure share 0.15.0
- Completed: Closures capturing a float or a string, read back at its own type upcoming
- Completed: Lambda parameters typed from their call sites (and from a sorted() key's elements), so indexing, len(), or a method call inside a lambda works #115 upcoming
- Completed: First-class closures: returned, passed as arguments, stored in collections, nested 0.14.0
- Completed: Higher-order functions (passing functions as arguments) 0.14.0
- Completed: Callable type tracking for function objects 0.8.0
- Completed: Generator functions - yield suspends and resumes with state preserved 0.14.0
- Completed: yield from delegation (ranges, lists, other generators) 0.14.0
- Completed: next(), send() with x = yield resume values, and close() 0.14.0
- Completed: Iterator protocol (__iter__, __next__) on user classes with StopIteration 0.14.0
- Completed: Generator type tracking (Generator[T]) 0.8.0
- Completed: range() function implementation - all variants 0.8.0
- Completed: for loop iteration over ranges with step support 0.8.0
- Completed: Tuple targets in for loops (for a, b in pairs, star targets) 0.14.0
- Completed: enumerate(), zip(), and dict.items()/.keys()/.values() in for loops 0.14.0
- Completed: yield inside try / except / finally and with, resuming inside them; close() raising GeneratorExit at the suspended yield (finally blocks and handlers run, a generator yielding instead is CPython's RuntimeError); and generator methods holding their instance upcoming
- Completed: len() of a generator is refused, as CPython raises TypeError #133 0.18.0
- Completed: zip() with a generator or iterator after its first argument, pulled one value per round in CPython's order #133 upcoming
- Completed: open(path, mode) through WASI: path_open on the preopened directories (r, w, a, b, + modes); the waspy_host imports under the deprecated waspy_host_file_io option upcoming
- Completed: read() / read(n) returning strings (64 KiB default cap per call) 0.14.0
- Completed: write(s) returning bytes written; close() and flush() 0.14.0
- Completed: with open(...) as f: context-manager form (desugared to open/body/close) 0.14.0
- Completed: File imports emitted only when open() is used - other modules keep zero imports 0.14.0
- Completed: A file open() cannot open raises CPython's exception (FileNotFoundError: [Errno 2] No such file or directory: 'x', PermissionError, IsADirectoryError, ...) upcoming
- Completed: try / except / finally blocks 0.7.0
- Completed: raise transfers control: it leaves the block, the try body, and the loop it is raised in 0.15.0
- Completed: Propagation across calls: an exception travels out of a callee into the caller's handler 0.15.0
- Completed: Handler matching by type, except (A, B) for either, except Exception for any; unmatched handlers pass it on 0.15.0
- Completed: finally and __exit__ run while an exception propagates, and on return / break / continue 0.15.0
- Completed: An uncaught exception unwinds out of the program and traps 0.15.0
- Completed: Exception objects: raise E(args) raises an instance and except ... as e binds it; str(e), repr(e), e.args, user exception classes with __init__ and fields, super().__init__, raise X from Y with __cause__, and CPython's messages for the runtime's own faults upcoming
- Completed: An exception the __main__ block does not catch writes the last line of CPython's report to stderr (Name: str(e)) and exits with status 1 upcoming
- Completed: raise and raise e inside a handler re-raise the caught exception's type 0.18.0
- Completed: Subclass matching: except Base catches its subclasses, along user classes and CPython's builtin hierarchy (LookupError over IndexError and KeyError, ArithmeticError over ZeroDivisionError, RuntimeError over NotImplementedError) upcoming
- Completed: Runtime faults raise catchable exceptions: IndexError for an out-of-range index, KeyError for a missing key, ZeroDivisionError 0.15.0
- Completed: assert raises AssertionError when its condition is false, evaluating the message only then upcoming
- Completed: int() of a bad string raises a catchable ValueError 0.18.0
- Completed: Collection faults raise: list.index / list.remove of a missing value (ValueError), set.remove of a missing member (KeyError), pop out of range or from an empty list (IndexError) upcoming
- Completed: __exit__ receives the exception leaving a with block and suppresses it by answering true; an exception __exit__ raises replaces it, and return / break leave through __exit__(None, None, None) upcoming
- Completed: Bytes type & binary data handling 0.7.0
- Completed: Bytes literals, indexing, slicing, concatenation 0.7.0
- Completed: Set type ({1, 2, 3}) & literals 0.7.0
- Completed: Empty sets with type annotations 0.7.0
- Completed: Set mutation: add, remove, discard 0.15.0
- Completed: Set operations: union, intersection, difference, symmetric difference as methods and operators, subset and equality tests (a method takes a set argument) 0.18.0
- Completed: The rest of the set API: update, intersection_update, difference_update, symmetric_difference_update and the in-place operators, copy, pop, clear, set(iterable), and methods taking a list or tuple as well as a set upcoming
- Completed: Iterating a set (for, comprehensions, sum, sorted, min, max, pop) visits its members in CPython's order for ints, floats, and tuples of them: CPython's hashes and table algorithm upcoming
- Completed: Tuple literals with variable expressions (a, b, c) 0.8.0
- Completed: Tuple indexing with type tracking 0.8.0
- Completed: Heterogeneous tuples with mixed types 0.8.0
- Completed: A tuple mixing int and float members ((1, 2.5)), each read at its own width: indexing, unpacking, equality, ordering, hashing, in, count, index, str() upcoming
- Completed: Tuple unpacking & assignment (a, b = (1, 2)) 0.8.0
- Completed: Extended (starred) unpacking (a, *b, c = xs) 0.14.0
- Completed: Tuple .count() 0.8.0
- Completed: Tuple .index() (a missing value traps where CPython raises ValueError) 0.18.0
- Completed: Named tuples - namedtuple() and typing.NamedTuple, defined at module level: fields by name and position, unpacking, and tuple equality upcoming
- Completed: String formatting: f-strings, .format() with automatic and positional fields, .2f-style precision 0.16.0
- Completed: String formatting: the full format spec (width, alignment, sign, grouping, types), named .format() fields, !r / !a, runtime % upcoming
- Completed: Property decorators (@property, @<name>.setter) 0.12.0
- Completed: Static & class methods (@staticmethod, @classmethod with cls factories) 0.12.0
- Completed: Multiple inheritance with CPython's C3 method resolution order: methods and fields from every base, cooperative super() following the instance's MRO, isinstance against every base, and an inconsistent order refused as CPython's TypeError upcoming
- Completed: Metaclasses: class M(type) with metaclass=M (inherited by subclasses), M.__new__ and M.__init__ run once as each class is created, attributes they give the class, M.__call__ replacing instantiation, M's methods and class variables reached through the class; type(x), x.__class__, and __name__ #8 upcoming