[Python-checkins] r68335 - peps/trunk/pep0/pep.py

benjamin.peterson python-checkins at python.org
Mon Jan 5 02:38:06 CET 2009


Author: benjamin.peterson
Date: Mon Jan  5 02:38:06 2009
New Revision: 68335

Log:
employ a rather nasty hack to sort umlauts properly

Modified:
   peps/trunk/pep0/pep.py

Modified: peps/trunk/pep0/pep.py
==============================================================================
--- peps/trunk/pep0/pep.py	(original)
+++ peps/trunk/pep0/pep.py	Mon Jan  5 02:38:06 2009
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 """Code for handling object representation of a PEP."""
 import re
 import textwrap
@@ -94,7 +95,9 @@
                 break
         else:
             raise ValueError("last name missing a capital letter")
-        return u' '.join(name_parts[index:])
+        # This replace() hack is so people with an umlaut will sort in the right
+        # letter.
+        return u' '.join(name_parts[index:]).replace(u"ö", u"o")
 
     def _last_name(self, full_name):
         """Find the last name (or nickname) of a full name.


More information about the Python-checkins mailing list