This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Athul-R
Recipients Athul-R
Date 2020-11-10.15:31:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1605022268.82.0.95951478559.issue42313@roundup.psfhosted.org>
In-reply-to
Content
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`
"""
History
Date User Action Args
2020-11-10 15:31:08Athul-Rsetrecipients: + Athul-R
2020-11-10 15:31:08Athul-Rsetmessageid: <1605022268.82.0.95951478559.issue42313@roundup.psfhosted.org>
2020-11-10 15:31:08Athul-Rlinkissue42313 messages
2020-11-10 15:31:08Athul-Rcreate