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`.
This commit is contained in:
cmdicely
2026-09-26 13:57:27 -07:00
committed by GitHub
parent 44eb0cef0b
commit beb832316c
+1 -1
View File
@@ -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)