Issue 378 in roster-dns-management: Possible problems with lstrip(), rstrip(), and strip()

0 views
Skip to first unread message

roster-dns...@googlecode.com

unread,
Jul 19, 2013, 2:18:45 PM7/19/13
to roster-iss...@googlegroups.com
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

roster-dns...@googlecode.com

unread,
Aug 16, 2013, 11:45:10 AM8/16/13
to roster-iss...@googlegroups.com
Updates:
Owner: ---

Comment #1 on issue 378 by J.S.P...@gmail.com: Possible problems with
(No comment was entered for this change.)
Reply all
Reply to author
Forward
0 new messages