New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug in String rstrip method #41461
Comments
There appears to be a data sensitive bug in the string rstrip
method as demonstrated by the following code:
>>> "ecigrcal.fle".rstrip(".fle")
'ecigrca'
As you can see, it is striping an extra character. |
Logged In: YES I don't think this is a bug. The documentation for the rstrip(...)
S.rstrip([chars]) -> string or unicode
Return a copy of the string S with trailing whitespace
removed.
If chars is given and not None, remove characters in
chars instead. When you pass the method ".rle", you're telling it to treat |
Logged In: YES Yes, dsm001 is right. The argument is treated as a _set_ of |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: