[pypy-svn] r61854 - pypy/trunk/pypy/lib

getxsick at codespeak.net getxsick at codespeak.net
Fri Feb 13 21:59:24 CET 2009


Author: getxsick
Date: Fri Feb 13 21:59:23 2009
New Revision: 61854

Modified:
   pypy/trunk/pypy/lib/_locale.py
Log:
(jlg, getxsick)
minor bugfix.
ctypes version added (in some cases) unnecessary 0 at the end of the list for grouping fields from the lconv structure.


Modified: pypy/trunk/pypy/lib/_locale.py
==============================================================================
--- pypy/trunk/pypy/lib/_locale.py	(original)
+++ pypy/trunk/pypy/lib/_locale.py	Fri Feb 13 21:59:23 2009
@@ -215,7 +215,8 @@
 
 def _copy_grouping(text):
     groups = [ ord(group) for group in text ]
-    groups.append(0)
+    if groups:
+        groups.append(0)
     return groups
 
 def localeconv():



More information about the Pypy-commit mailing list