Skip to content

Keywords

Apart from Builtins and behaviors explicitly replaced in this specification, Lucid preserves Python's ordinary keyword vocabulary.

Preserved Python keywords

The preserved Python keywords, linked where this specification gives one new or narrowed meaning: and, as, assert, async, await, break, class, continue, def, del, elif, else, except, finally, for, from, if, import, in, is, not, or, pass, raise, return, try, while, with, and yield.

New Lucid keywords

Lucid adds keywords for construction, destructuring, class member kinds, closing off rebinding or further class inheritance or overriding, explicit overrides, declining generated behavior, guaranteed-cleanup context managers, abstraction, dispatch, external trait implementation, type expressions, existential quantification, exhaustive pattern matching, and elision. Listed in the order each is first defined: final, _, let, type, trust, without, any, skip, if_broken, match, case, dispatch, contextmanager, trait, override, implement, getter, setter, classvar, classmethod, sealed, factory, and construct.

Discarded Python keywords

Lucid discards global and nonlocal, Python's scope-rebinding declarations — see the No global and No nonlocal rules in Scope.

Lucid discards lambda. It's spelled def: now, generalized: an anonymous function is just a def with no name (see Anonymous functions).