[pypy-svn] r5598 - pypy/trunk/src/pypy/objspace/std

mwh at codespeak.net mwh at codespeak.net
Wed Jul 21 13:06:41 CEST 2004


Author: mwh
Date: Wed Jul 21 13:06:40 2004
New Revision: 5598

Modified:
   pypy/trunk/src/pypy/objspace/std/dictobject.py
Log:
reduce gratuitous use of string formatting (i realize the right
fix is to make string formatting faster...)


Modified: pypy/trunk/src/pypy/objspace/std/dictobject.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/dictobject.py	(original)
+++ pypy/trunk/src/pypy/objspace/std/dictobject.py	Wed Jul 21 13:06:40 2004
@@ -240,8 +240,8 @@
 def app_str__Dict(d):
     items = []
     for k, v in d.iteritems():
-        items.append("%r: %r" % (k, v))
-    return "{%s}" % ', '.join(items)
+        items.append(repr(k) + ": " + repr(v))
+    return "{" +  ', '.join(items) + "}"
 
 repr__Dict = str__Dict = gateway.app2interp(app_str__Dict)
 from pypy.objspace.std import dicttype



More information about the Pypy-commit mailing list