Replace str.find()!=1 with the more readable "in" operator.

This commit is contained in:
Raymond Hettinger 2004-05-04 09:21:43 +00:00
parent c5e378da41
commit bac788a3cd
7 changed files with 9 additions and 9 deletions

View file

@ -250,7 +250,7 @@ class TimeRE(dict):
format = regex_chars.sub(r"\\\1", format)
whitespace_replacement = re_compile('\s+')
format = whitespace_replacement.sub('\s*', format)
while format.find('%') != -1:
while '%' in format:
directive_index = format.index('%')+1
processed_format = "%s%s%s" % (processed_format,
format[:directive_index-1],