diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2020-02-17 09:03:00 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-17 09:03:00 (GMT) |
commit | 85a2eef473a2c9ed3ab9c6ee339891fe99adbbc9 (patch) | |
tree | b2a799d451822e2cb92a1540599a114528cf97b2 /Doc/library | |
parent | c33bdbb20cf55b3a2aa7a91bd3d91fcb59796fad (diff) | |
download | cpython-85a2eef473a2c9ed3ab9c6ee339891fe99adbbc9.zip cpython-85a2eef473a2c9ed3ab9c6ee339891fe99adbbc9.tar.gz cpython-85a2eef473a2c9ed3ab9c6ee339891fe99adbbc9.tar.bz2 |
bpo-32892: Update the documentation for handling constants in AST. (GH-18514)
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/ast.rst | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Doc/library/ast.rst b/Doc/library/ast.rst index 2cee873..bfd571d 100644 --- a/Doc/library/ast.rst +++ b/Doc/library/ast.rst @@ -101,12 +101,16 @@ Node classes node = ast.UnaryOp(ast.USub(), ast.Constant(5, lineno=0, col_offset=0), lineno=0, col_offset=0) +.. versionchanged:: 3.8 + + Class :class:`ast.Constant` is now used for all constants. + .. deprecated:: 3.8 - Class :class:`ast.Constant` is now used for all constants. Old classes - :class:`ast.Num`, :class:`ast.Str`, :class:`ast.Bytes`, + Old classes :class:`ast.Num`, :class:`ast.Str`, :class:`ast.Bytes`, :class:`ast.NameConstant` and :class:`ast.Ellipsis` are still available, - but they will be removed in future Python releases. + but they will be removed in future Python releases. In the meanwhile, + instantiating them will return an instance of a different class. .. _abstract-grammar: |