[issue30045] Bad parameter name in re.escape()
Serhiy Storchaka
report at bugs.python.org
Tue Apr 11 16:28:24 EDT 2017
New submission from Serhiy Storchaka:
Currently re.escape() parameter has a name "pattern", but in the documentation the name of the parameter is "string".
The name "pattern" is not correct, and maybe even misleading. The argument of escape() is not a pattern, it is an arbitrary string, and escape() makes a pattern from it by escaping special characters.
It is unlikely that the argument is passed to re.escape() by keyword. Therefore renaming it to "string" shouldn't break existing code.
----------
components: Regular Expressions
messages: 291514
nosy: ezio.melotti, mrabarnett, r.david.murray, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Bad parameter name in re.escape()
type: enhancement
versions: Python 3.7
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30045>
_______________________________________
More information about the Python-bugs-list
mailing list