Skip to content

Commit 4c3560d

Browse files
authored
add ast.Num.n as alias for ast.Num.value for backwards compatibility. (#14355)
1 parent 088a4b8 commit 4c3560d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

stdlib/ast.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1697,6 +1697,8 @@ if sys.version_info < (3, 14):
16971697
@deprecated("Replaced by ast.Constant; removed in Python 3.14")
16981698
class Num(Constant, metaclass=_ABC):
16991699
value: int | float | complex
1700+
# Aliases for value, for backwards compatibility
1701+
n: int | float | complex
17001702

17011703
@deprecated("Replaced by ast.Constant; removed in Python 3.14")
17021704
class Str(Constant, metaclass=_ABC):

0 commit comments

Comments
 (0)