Status: New
Owner:
J.S.P...@gmail.com
Labels: Type-Review
New issue 378 by
J.S.P...@gmail.com: Possible problems with lstrip(),
rstrip(), and strip()
http://code.google.com/p/roster-dns-management/issues/detail?id=378
During testing, Seth unearthed an interesting fact about the Python
functions lstrip, rstrip, and strip. They do not work as the Roster
developers may have intended. I know that I have written code with *strip
in the past that assumes they work a way they do not.
Example:
>>> '
purdue.edu'.rstrip('.edu')
'pur'
Seth and I (and possibly others) were always under the impression that this
command would return 'purdue'
*strip is used all over Roster. Many of these uses may be incorrect, and
thus may produce bugs.
The documentation on *strip can be viewed here:
http://docs.python.org/2/library/stdtypes.html
We need to grep through Roster and make sure that *strip usage is correct
in all cases.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings