changeset 1867:8166b37db555

remove backticks, using repr() instead
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 10 Mar 2007 20:54:09 +0100
parents 0194beaf511e
children 64507f46beb2
files MoinMoin/logfile/editlog.py MoinMoin/parser/text_moin_wiki.py MoinMoin/script/migration/wikimarkup_converter.py MoinMoin/util/bdiff.py
diffstat 4 files changed, 13 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/logfile/editlog.py	Sat Mar 10 19:20:19 2007 +0100
+++ b/MoinMoin/logfile/editlog.py	Sat Mar 10 20:54:09 2007 +0100
@@ -201,7 +201,7 @@
         expr = "1"
         for field in ['pagename', 'addr', 'hostname', 'userid']:
             if kw.has_key(field):
-                expr = "%s and x.%s == %s" % (expr, field, `kw[field]`)
+                expr = "%s and x.%s == %s" % (expr, field, repr(kw[field]))
 
         if kw.has_key('ed_time_usecs'):
             expr = "%s and long(x.ed_time_usecs) == %s" % (expr, long(kw['ed_time_usecs'])) # must be long for py 2.2.x
--- a/MoinMoin/parser/text_moin_wiki.py	Sat Mar 10 19:20:19 2007 +0100
+++ b/MoinMoin/parser/text_moin_wiki.py	Sat Mar 10 20:54:09 2007 +0100
@@ -924,9 +924,11 @@
         else:
             # We should never get here
             import pprint
-            raise Exception("Can't handle match " + `match`
-                + "\n" + pprint.pformat(match.groupdict())
-                + "\n" + pprint.pformat(match.groups()) )
+            raise Exception("Can't handle match %r\n%s\n%s" % (
+                match,
+                pprint.pformat(match.groupdict()),
+                pprint.pformat(match.groups()),
+            ))
 
         return ""
 
--- a/MoinMoin/script/migration/wikimarkup_converter.py	Sat Mar 10 19:20:19 2007 +0100
+++ b/MoinMoin/script/migration/wikimarkup_converter.py	Sat Mar 10 20:54:09 2007 +0100
@@ -652,9 +652,11 @@
         else:
             # We should never get here
             import pprint
-            raise Exception("Can't handle match " + `match`
-                + "\n" + pprint.pformat(match.groupdict())
-                + "\n" + pprint.pformat(match.groups()) )
+            raise Exception("Can't handle match %r\n%s\n%s" % (
+                match,
+                pprint.pformat(match.groupdict()),
+                pprint.pformat(match.groups()),
+            ))
 
         return ""
 
--- a/MoinMoin/util/bdiff.py	Sat Mar 10 19:20:19 2007 +0100
+++ b/MoinMoin/util/bdiff.py	Sat Mar 10 20:54:09 2007 +0100
@@ -86,8 +86,8 @@
 
     d = diff(a, b)
     z = compress(d)
-    print `patchtext(d)`
-    print `d`
+    print repr(patchtext(d))
+    print repr(d)
     print "".join(b) == patch("".join(a), d)
     print len(d), len(z)