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:
+1
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user