@@ -1444,6 +1444,17 @@ Optimizations
14441444Deprecated
14451445==========
14461446
1447+ * Currently Python accepts numeric literals immediately followed by keywords,
1448+ for example `` 0in x`` , `` 1or x`` , `` 0if 1else 2 `` . It allows confusing
1449+ and ambigious expressions like `` [0x1for x in y]`` (which can be
1450+ interpreted as `` [0x 1 for x in y]`` or `` [0x 1f or x in y]`` ). Starting in
1451+ this release, a deprecation warning is raised if the numeric literal is
1452+ immediately followed by one of keywords :keyword:`and ` , :keyword:`else ` ,
1453+ :keyword:`for `, :keyword:` if `, :keyword:` in ` , :keyword:`is ` and :keyword:`or ` .
1454+ If future releases it will be changed to syntax warning, and finally to
1455+ syntax error.
1456+ (Contributed by Serhiy Storchaka in :issue:`43833 ` ).
1457+
14471458* Starting in this release, there will be a concerted effort to begin
14481459 cleaning up old import semantics that were kept for Python 2.7
14491460 compatibility. Specifically,
@@ -1670,6 +1681,18 @@ This section lists previously described changes and other bugfixes
16701681that may require changes to your code.
16711682
16721683
1684+ Changes in the Python syntax
1685+ ----------------------------
1686+
1687+ * Deprecation warning is now emitted when compiling previously valid syntax
1688+ if the numeric literal is immediately followed by a keyword (like in `` 0in x`` ).
1689+ If future releases it will be changed to syntax warning, and finally to a
1690+ syntax error. To get rid of the warning and make the code compatible with
1691+ future releases just add a space between the numeric literal and the
1692+ following keyword.
1693+ (Contributed by Serhiy Storchaka in :issue:`43833 ` ).
1694+
1695+
16731696Changes in the Python API
16741697------------------------ -
16751698
@@ -1791,6 +1814,16 @@ Build Changes
17911814C API Changes
17921815============ =
17931816
1817+ PEP 652 : Maintaining the Stable ABI
1818+ ---------------------------------- -
1819+
1820+ The Stable ABI (Application Binary Interface) for extension modules or
1821+ embedding Python is now explicitly defined.
1822+ :ref:`stable` describes C API and ABI stability guarantees along with best
1823+ practices for using the Stable ABI .
1824+
1825+ (Contributed by Petr Viktorin in :pep:`652 ` and :issue:`43795 ` .)
1826+
17941827New Features
17951828------------
17961829
0 commit comments