From: R David Murray Date: Thu, 27 Feb 2014 23:32:32 +0000 (-0500) Subject: whatsnew: return types of re functions. X-Git-Tag: v3.4.1rc1~233^2~168 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ecef6cd2f1de88980dfbf417191a7b7f095ac5f2;p=thirdparty%2FPython%2Fcpython.git whatsnew: return types of re functions. --- diff --git a/Doc/whatsnew/3.4.rst b/Doc/whatsnew/3.4.rst index 16799ff70c8b..562a29a345ff 100644 --- a/Doc/whatsnew/3.4.rst +++ b/Doc/whatsnew/3.4.rst @@ -1987,6 +1987,13 @@ Changes in the Python API in theory this should not cause backward compatibility issues since the disallowed command forms didn't make any sense and are unlikely to be in use. +* The :func:`re.split`, :func:`re.findall`, and :func:`re.sub` functions, and + the :meth:`~re.match.group` and :meth:`~re.match.groups` methods of + :class:``match`` objects now always return a *bytes* object when the string + to be matched is a :term:`bytes-like object`. Previously the return type + matched the input type, so if your code was depending on the return value + being, say, a ``bytearray``, you will need to change your code. + Changes in the C API --------------------