may be a bug in string.rstrip

kyo guan kyoguan at gmail.com
Thu Nov 22 23:09:50 EST 2007


Hi :

	Please look at this code:	

>>> 'exe.torrent'.rstrip('.torrent')
'ex'			<-----  it should be 'exe', why?

but this is a right answer:

>>> '120.exe'.rstrip('.exe')        
'120'			<------ this is a right value.

	there is a bug in the rstrip, lstrip there isn't this problem.



Kyo.




More information about the Python-list mailing list