This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients serhiy.storchaka
Date 2017-01-07.12:04:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1483790693.93.0.397432841389.issue29195@psf.upfronthosting.co.za>
In-reply-to
Content
Many re methods accepted the string parameter as a keyword argument by wrong name. This was fixed in issue20283. Wrong keyword names were still accepted, but a deprecation warning was emitted if use them. Proposed patch finishes the deprecation period (started since 3.4) and removes the support of wrong names.

Python 2.7.7, 3.3.6, 3.4-3.6:

>>> import re
>>> re.compile('.').match(pattern='a')
__main__:1: DeprecationWarning: The 'pattern' keyword parameter name is deprecated.  Use 'string' instead.
<_sre.SRE_Match object; span=(0, 1), match='a'>
>>> re.compile('.').match(string='a')
<_sre.SRE_Match object; span=(0, 1), match='a'>

Python 3.7:

>>> re.compile('.').match(pattern='a')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: Required argument 'string' (pos 1) not found
History
Date User Action Args
2017-01-07 12:04:54serhiy.storchakasetrecipients: + serhiy.storchaka
2017-01-07 12:04:53serhiy.storchakasetmessageid: <1483790693.93.0.397432841389.issue29195@psf.upfronthosting.co.za>
2017-01-07 12:04:53serhiy.storchakalinkissue29195 messages
2017-01-07 12:04:53serhiy.storchakacreate