Antoine Pitrou added the comment:

It may be unexpected, but it's not a bug. From the documentation:

"""Return a copy of the string with trailing characters removed. The chars 
argument is a string specifying the set of characters to be removed. If omitted 
or None, the chars argument defaults to removing whitespace. **The chars 
argument is not a suffix; rather, all combinations of its values are 
stripped**.""" (emphasis mine)

https://docs.python.org/3/library/stdtypes.html#str.rstrip

(if you wonder why that is, think about e.g. the use case of stripping certain 
whitespace characters: s.rstrip(" \t"))

----------
nosy: +pitrou
resolution:  -> not a bug
status: open -> closed

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

Reply via email to