From 067125be853a45494f57777a5fc01ed2171f4563 Mon Sep 17 00:00:00 2001 From: Hunter Hogan Date: Mon, 30 Jun 2025 23:59:56 -0500 Subject: [PATCH] add `ast.Num.n` as alias for `ast.Num.value` for backwards compatibility. --- stdlib/ast.pyi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stdlib/ast.pyi b/stdlib/ast.pyi index 613940f5da6a..4000e85f31c4 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):