-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Milestone
Description
There have been some recent changes to the Python AST:
- Python 3.10:
match
/case
(pattern matching, now a native Python feature) - Python 3.11:
try
/except*
(exception groups) - Python 3.12:
type
statement (type alias)
Full details in official docs.
Question is, what do we need to change in unpythonic
to support these? At least:
- DONE in 58388fc:
lazify
andautocurry
should not recurse intoast.TypeAlias
, because lazifying or autocurrying a type declaration makes no sense. - DONE in 040e333: Anything that touches on exception handling in the macro layer needs to detect
TryStar
as well asTry
.- Not much detects
Try
; justautoreturn
and scopeanalyzer.
- Not much detects
- DONE in faab516: Anything that detects binding forms needs to detect captures in
match
/case
.- It seems
unpythonic/syntax/scopeanalyzer.py
is the only such part. But this is used in thelet
constructs (includingdo
) as well as inlazify
, so fixing that should be enough. - Bindings from the
type
statement are handled automatically by the old machinery, because they are names inStore
context.
- It seems
Anything else I'm missing?
Metadata
Metadata
Assignees
Labels
No labels