From beb832316c18311f3b1a25ab67bd7fe2e2b29b77 Mon Sep 17 00:00:00 2001 From: cmdicely Date: Sat, 26 Sep 2026 13:57:27 -0700 Subject: [PATCH] Update power_puter.py use `ast.Contant.value` instead of `ast.Constant.n` in python 3.14+ `ast.Constant.n` was a compatibility shim for `ast.Num` on `ast.Constant`. It was removed in python 3.14 along with `ast.Num`. --- py/power_puter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py/power_puter.py b/py/power_puter.py index 37b65e4..8ff4294 100644 --- a/py/power_puter.py +++ b/py/power_puter.py @@ -525,7 +525,7 @@ class _Puter: return self._eval_statement(stmt.value, ctx=ctx) if isinstance(stmt, AstNumConstantClasses): - return stmt.n + return stmt.n if hasattr(stmt, "n") else stmt.value if isinstance(stmt, ast.BinOp): left = self._eval_statement(stmt.left, ctx=ctx)