diff MoinMoin/macro/__init__.py @ 1183:bc84eae93f8c

replace usage of find by 'in' operator
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 14 Aug 2006 01:24:01 +0200
parents db56bd53fc32
children c0f994eb1455
line wrap: on
line diff
--- a/MoinMoin/macro/__init__.py	Mon Aug 14 00:54:29 2006 +0200
+++ b/MoinMoin/macro/__init__.py	Mon Aug 14 01:24:01 2006 +0200
@@ -342,7 +342,7 @@
         for tag, url in list:
             buf.write('<dt><tt><a href="%s">%s</a></tt></dt>' % (
                 wikiutil.join_wiki(url, 'RecentChanges'), tag))
-            if url.find('$PAGE') == -1:
+            if '$PAGE' not in url:
                 buf.write('<dd><tt><a href="%s">%s</a></tt></dd>' % (url, url))
             else:
                 buf.write('<dd><tt>%s</tt></dd>' % url)
@@ -462,7 +462,7 @@
         from MoinMoin.mail.sendmail import decodeSpamSafeEmail
 
         args = args or ''
-        if args.find(',') == -1:
+        if ',' not in args:
             email = args
             text = ''
         else: