Design decisions

181. One-line enums use = and |; variants with fields use the block form (2026-11-21)

  • Decision. The empty optional is None everywhere in the spec (lowercase none survives only as the print option none:). not is a prefix operator at precedence level 12, below comparisons, and is removed from the unary production. A one-line enum is enum Dir = L | R | U | D; an enum with payload variants uses the indented block. The comma form enum Dir: N, E, S, W is gone.
  • Why. The rebuild found each of these spelled two ways (H-NONE-CASE, H-NOT-PRECEDENCE, H-ENUM-ONE-LINE). = is what the grammar, the implementation and the conformance cases already use; the precedence follows Python, so not a == b is not (a == b).
  • Reverse. Add ':' variant (',' variant)* NL to enum_decl, or move not back into unary.