Message284911
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 |
|
Date |
User |
Action |
Args |
2017-01-07 12:04:54 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka |
2017-01-07 12:04:53 | serhiy.storchaka | set | messageid: <1483790693.93.0.397432841389.issue29195@psf.upfronthosting.co.za> |
2017-01-07 12:04:53 | serhiy.storchaka | link | issue29195 messages |
2017-01-07 12:04:53 | serhiy.storchaka | create | |
|