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/whatsnew/3.8.rst | |
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/whatsnew/3.8.rst')
-rw-r--r-- | Doc/whatsnew/3.8.rst | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.8.rst b/Doc/whatsnew/3.8.rst index cb4c518..09047c4 100644 --- a/Doc/whatsnew/3.8.rst +++ b/Doc/whatsnew/3.8.rst @@ -1940,6 +1940,12 @@ Changes in the Python API :exc:`dbm.gnu.error` or :exc:`dbm.ndbm.error`) instead of :exc:`KeyError`. (Contributed by Xiang Zhang in :issue:`33106`.) +* Simplified AST for literals. All constants will be represented as + :class:`ast.Constant` instances. Instantiating old classes ``Num``, + ``Str``, ``Bytes``, ``NameConstant`` and ``Ellipsis`` will return + an instance of ``Constant``. + (Contributed by Serhiy Storchaka in :issue:`32892`.) + * :func:`~os.path.expanduser` on Windows now prefers the :envvar:`USERPROFILE` environment variable and does not use :envvar:`HOME`, which is not normally set for regular user accounts. |