summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2023-08-16 20:35:35 (GMT)
committerGitHub <noreply@github.com>2023-08-16 20:35:35 (GMT)
commit882cb79afa2cb11b180ef699fd5cf038e72f6c85 (patch)
tree5ceb212dacf1ba5529aabb9ad5ac2791e8446db2 /Doc/whatsnew
parentfb8fe377c4ddaea24ea6aa0a8f5d036986373d39 (diff)
downloadcpython-882cb79afa2cb11b180ef699fd5cf038e72f6c85.zip
cpython-882cb79afa2cb11b180ef699fd5cf038e72f6c85.tar.gz
cpython-882cb79afa2cb11b180ef699fd5cf038e72f6c85.tar.bz2
gh-56166: Deprecate passing confusing positional arguments in re functions (#107778)
Deprecate passing optional arguments maxsplit, count and flags in module-level functions re.split(), re.sub() and re.subn() as positional. They should only be passed by keyword.
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r--Doc/whatsnew/3.13.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.13.rst b/Doc/whatsnew/3.13.rst
index 84ffd84..519dee5 100644
--- a/Doc/whatsnew/3.13.rst
+++ b/Doc/whatsnew/3.13.rst
@@ -832,6 +832,13 @@ Porting to Python 3.13
Deprecated
----------
+* Passing optional arguments *maxsplit*, *count* and *flags* in module-level
+ functions :func:`re.split`, :func:`re.sub` and :func:`re.subn` as positional
+ arguments is now deprecated.
+ In future Python versions these parameters will be
+ :ref:`keyword-only <keyword-only_parameter>`.
+ (Contributed by Serhiy Storchaka in :gh:`56166`.)
+
* Deprecate the old ``Py_UNICODE`` and ``PY_UNICODE_TYPE`` types: use directly
the :c:type:`wchar_t` type instead. Since Python 3.3, ``Py_UNICODE`` and
``PY_UNICODE_TYPE`` are just aliases to :c:type:`wchar_t`.