[issue37114] lstrip remove extra characters in the presence of a matching number
Akilesh K
report at bugs.python.org
Fri May 31 08:40:18 EDT 2019
New submission from Akilesh K <akilesh1597 at gmail.com>:
When the argument to lstrip / strip has a number and it matches the string it begins to act different.
>>> text = "apiv1appliance"
>>> text.strip("apiv1")
'liance'
>>> text.strip("apiv2")
'1appliance'
>>> text.strip("a")
'piv1appliance'
>>> text.strip("ap")
'iv1appliance'
>>> text.strip("api")
'v1appliance'
>>> text.strip("apiv")
'1appliance'
>>> text.strip("apiv1")
'liance'
>>> text.strip("apiv2")
'1appliance'
----------
messages: 344070
nosy: Akilesh K
priority: normal
severity: normal
status: open
title: lstrip remove extra characters in the presence of a matching number
type: behavior
versions: Python 2.7, Python 3.5
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37114>
_______________________________________
More information about the Python-bugs-list
mailing list