🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.python.announce
1 messages
1 total messages Started by Stanislaw Adaszewski Wed, 14 Oct 2026 20:02
[Python-announce] PEP 638 (syntactic macros): a runnable sandbox for exploring the proposal
#1
Author: Stanislaw Adaszewski
Date: Wed, 14 Oct 2026 20:02
32 lines
8772 bytes
Hi all,

I’ve put together a browser-based sandbox for PEP 638 (syntactic
macros), so the proposal can be tried out and discussed against code
that runs rather than against the text alone:

Sandbox: https://sadaszewski.github.io/python-pep638-syntactic-macros/
Source (CPython 3.14.2 patch, Pyodide build, notes):
https://github.com/sadaszewski/python-pep638-syntactic-macros

Two things up front. The implementation is AI-generated, and it is not
being proposed for inclusion in CPython. Its only purpose is to make
it possible to explore the PEP: what the three macro kinds feel like
in practice, where the PEP leaves behaviour unspecified (the notes in
the repo list the places I had to make a decision), and whether a
proposal along these lines is something the Steering Council would
ever consider.

It implements the PEP as written: the name! token, statement and
expression macro forms, import!/from! at compile time, the three
processor kinds, multi-part macros, stmt_expr, and .pyc invalidation
on macro version changes. The sandbox has seven worked examples to
start from.

If people find it useful for discussing the PEP, I’d be glad to hear
where that discussion should take place.

Best regards,

--
Stan Adaszewski
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads