]> granicus.if.org Git - python/commitdiff
_split_ascii(): Small optimization by RH.
authorBarry Warsaw <barry@python.org>
Mon, 10 May 2004 14:44:04 +0000 (14:44 +0000)
committerBarry Warsaw <barry@python.org>
Mon, 10 May 2004 14:44:04 +0000 (14:44 +0000)
Lib/email/Header.py

index 7f2b444d1fa31ba270cafb67796b1695d1dc893b..21acaf1179014bb8c172f9f45af24e947fe7da83 100644 (file)
@@ -411,7 +411,7 @@ def _split_ascii(s, firstlen, restlen, continuation_ws, splitchars):
         # syntax; we just try to break on semi-colons, then commas, then
         # whitespace.
         for ch in splitchars:
-            if line.find(ch) >= 0:
+            if ch in line:
                 break
         else:
             # There's nothing useful to split the line on, not even spaces, so