diff options
author | Victor Stinner <vstinner@redhat.com> | 2019-05-24 21:57:23 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-24 21:57:23 (GMT) |
commit | a9f05d69ccbf3c75cdd604c25094282697789a62 (patch) | |
tree | b26677a8437f12e011b3adb574f32aa0bbff8739 /Doc/whatsnew | |
parent | 561612d8456cfab5672c9b445521113b847bd6b3 (diff) | |
download | cpython-a9f05d69ccbf3c75cdd604c25094282697789a62.zip cpython-a9f05d69ccbf3c75cdd604c25094282697789a62.tar.gz cpython-a9f05d69ccbf3c75cdd604c25094282697789a62.tar.bz2 |
bpo-37032: Add CodeType.replace() method (GH-13542)
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r-- | Doc/whatsnew/3.8.rst | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Doc/whatsnew/3.8.rst b/Doc/whatsnew/3.8.rst index b5d70b5..a94aba6 100644 --- a/Doc/whatsnew/3.8.rst +++ b/Doc/whatsnew/3.8.rst @@ -240,6 +240,9 @@ Other Language Changes and Windows use this to properly terminate scripts in interactive sessions. (Contributed by Google via Gregory P. Smith in :issue:`1054041`.) +* Added new ``replace()`` method to the code type (:class:`types.CodeType`). + (Contributed by Victor Stinner in :issue:`37032`.) + New Modules =========== @@ -1051,7 +1054,8 @@ Changes in the Python API * :class:`types.CodeType` has a new parameter in the second position of the constructor (*posonlyargcount*) to support positional-only arguments defined - in :pep:`570`. + in :pep:`570`. A new ``replace()`` method of :class:`types.CodeType` can be + used to make the code future-proof. Changes in the C API |