From 4c3560d3a93942330a8bd055b54020710774bdcc Mon Sep 17 00:00:00 2001 From: Hunter Hogan Date: Mon, 7 Jul 2025 06:08:48 -0500 Subject: [PATCH] add `ast.Num.n` as alias for `ast.Num.value` for backwards compatibility. (#14355) --- stdlib/ast.pyi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stdlib/ast.pyi b/stdlib/ast.pyi index 1e31fadce..3f45ba581 100644 --- a/stdlib/ast.pyi +++ b/stdlib/ast.pyi @@ -1697,6 +1697,8 @@ if sys.version_info < (3, 14): @deprecated("Replaced by ast.Constant; removed in Python 3.14") class Num(Constant, metaclass=_ABC): value: int | float | complex + # Aliases for value, for backwards compatibility + n: int | float | complex @deprecated("Replaced by ast.Constant; removed in Python 3.14") class Str(Constant, metaclass=_ABC):