[issue6346] Rstrip Incorrectly Strips Some Strings

2009-06-26 Thread Ezio Melotti
Ezio Melotti added the comment: And you should probably use http://docs.python.org/library/os.path.html#os.path.splitext instead of .rstrip(). -- nosy: +ezio.melotti ___ Python tracker _

[issue6346] Rstrip Incorrectly Strips Some Strings

2009-06-26 Thread Benjamin Peterson
Benjamin Peterson added the comment: This is expected. rstrip() strips a set of characters, not a string. -- nosy: +benjamin.peterson resolution: -> invalid status: open -> closed ___ Python tracker __

[issue6346] Rstrip Incorrectly Strips Some Strings

2009-06-26 Thread Matt Kubilus
New submission from Matt Kubilus : Rstrip has unexpected behavior with some strings. Example: - >>> "proxa.py".rstrip(".py") 'proxa' >>> "proxy.py".rstrip(".py") 'prox' - Tested with Python 2.6.1 -- components: Library (Lib) messages: 89736 nosy: mkubilus severity: normal st