Dennis Sweeney <sweeney.dennis...@gmail.com> added the comment:

I'm +-0 on this. I would write something like this instead:

    assert whatever.startswith(prefix)
    result = whatever.removeprefix(prefix)

Note that if this were to change, the corresponding methods would also have to 
change on bytes, bytearray, and collections.UserString.

----------
nosy: +Dennis Sweeney

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

Reply via email to