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 BTaskaya
Recipients Athul-R, BTaskaya, zach.ware
Date 2020-11-10.17:16:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1605028590.72.0.854149815536.issue42313@roundup.psfhosted.org>
In-reply-to
Content
For 3.9+, you could do exactly what you want with .removesuffix (/.removeprefix) methods;
>>> test = "external_eeeeeeeee_object"
>>> test.removesuffix("_object")
'external_eeeeeeeee'
History
Date User Action Args
2020-11-10 17:16:30BTaskayasetrecipients: + BTaskaya, zach.ware, Athul-R
2020-11-10 17:16:30BTaskayasetmessageid: <1605028590.72.0.854149815536.issue42313@roundup.psfhosted.org>
2020-11-10 17:16:30BTaskayalinkissue42313 messages
2020-11-10 17:16:30BTaskayacreate