[New-bugs-announce] [issue44773] case_insensitive kwarg to str.replace()

Nimboss report at bugs.python.org
Thu Jul 29 13:10:44 EDT 2021


New submission from Nimboss <nimit.grover24 at gmail.com>:

Currently str.replace() has 3 arguments: old, new and count.
This issue suggests the new addition of another argument called case_insensitive (type bool, defaulted to False) which determines whether to ignore case when replacing said text or not.

Currently we have to use regex or logic (see https://stackoverflow.com/questions/919056/case-insensitive-replace), but it would just be a nice QoL feature to have a case_insensitive kwarg.

----------
components: Parser
messages: 398501
nosy: lys.nikolaou, nimit.grover24, pablogsal
priority: normal
severity: normal
status: open
title: case_insensitive kwarg to str.replace()
type: enhancement

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44773>
_______________________________________


More information about the New-bugs-announce mailing list