mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-06 21:43:59 +08:00
add ast.Num.n as alias for ast.Num.value for backwards compatibility. (#14355)
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user