New submission from Athul R <athulkann...@gmail.com>:

rstrip removes the trailing `e`s. 

i = "external_eeeeeeeee_object"
i = i.rstrip('_object')
print(i) 
"""
It should have printed `external_eeeeeeeee` but it prints only `external_`. 
"""

It happens only when I user rstrip("_object") not for other strings. 

# =======================================================
# it works fine in the below case. 


i = "external_eeeeeeeee_trail"
i = i.rstrip('_trail')
print(i) 
"""
It should have prints `external_eeeeeeeee`
"""

----------
components: Library (Lib)
files: python-bug.py
messages: 380678
nosy: Athul-R
priority: normal
severity: normal
status: open
title: rstrip removes the trailing `e`s.
type: behavior
versions: Python 3.8
Added file: https://bugs.python.org/file49590/python-bug.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42313>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to