Hy
raw JSON → 1.2.0 verified Fri May 01 auth: no python
A Lisp dialect embedded in Python. Current version 1.2.0, supports Python 3.9-3.14. Release cadence is irregular, with breaking changes common between major versions.
pip install hy Common errors
error ModuleNotFoundError: No module named 'hy' ↓
cause Hy is not installed.
fix
Run
pip install hy. error ImportError: cannot import name 'hy.core' from 'hy' ↓
cause Importing from hy.core directly is not allowed.
fix
Use
import hy and access via hy.core attribute if needed, but prefer public API. Warnings
breaking Python 3.8 support was dropped in Hy 1.0.0. ↓
fix Upgrade to Python 3.9+ and Hy 1.0.0+
breaking `defn/a`, `fn/a`, `with/a`, `yield-from` were removed in 0.29.0; use `:async` syntax instead. ↓
fix Replace `(defn/a f [] ...)` with `(defn :async f [] ...)`.
deprecated `hy.disassemble` removed in 0.29.0. ↓
fix Use `import dis; dis.dis(...)` on the compiled code.
gotcha `(except [[]] ...)` catches no exceptions, not all exceptions like `(except [] ...)`. Changed in 1.1.0. ↓
fix Use `(except [] ...)` to catch all exceptions.
breaking Reader macros now always read a full identifier after `#`. `#*foo` is now a reader macro call, not unpacking. ↓
fix Add space after `#*`: `#* foo`.
Imports
- hy.core wrong
from hy.core import ...correctimport hy.core
Quickstart
import hy
print(hy.mangle('foo?')) # hyx_fooXquestion_markX