[pypy-svn] r30708 - pypy/dist/pypy/objspace/std

arigo at codespeak.net arigo at codespeak.net
Fri Jul 28 19:48:48 CEST 2006


Author: arigo
Date: Fri Jul 28 19:48:46 2006
New Revision: 30708

Modified:
   pypy/dist/pypy/objspace/std/multimethod.py
Log:
Correctly add a integer suffix... and only one!  I got the name
__encode23456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
from this code.



Modified: pypy/dist/pypy/objspace/std/multimethod.py
==============================================================================
--- pypy/dist/pypy/objspace/std/multimethod.py	(original)
+++ pypy/dist/pypy/objspace/std/multimethod.py	Fri Jul 28 19:48:46 2006
@@ -108,10 +108,11 @@
         self.multimethod = multimethod
         # avoid prefix clashes, user code should supply different prefixes
         # itself for nice names in tracebacks
+        base_prefix = prefix
         n = 1
         while prefix in self.prefix_memo:
             n += 1
-            prefix = "%s%d" % (prefix,n)
+            prefix = "%s%d" % (base_prefix, n)
         self.prefix = prefix
         self.prefix_memo[prefix] = 1
         self.list_of_typeorders = list_of_typeorders



More information about the Pypy-commit mailing list