add ast.Num.n as alias for ast.Num.value for backwards compatibility. (#14355)

This commit is contained in:
Hunter Hogan
2025-07-07 06:08:48 -05:00
committed by GitHub
parent 088a4b8d41
commit 4c3560d3a9
+2
View File
@@ -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):