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 <rep...@bugs.python.org>
<http://bugs.python.org/issue30045>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to