"""
+__all__ = ["Collator"]
+
import collate._abcollator
import collate._locale
-__all__ = ["Collate"]
-
class Collator(collate._abcollator.Collator):
"""Codepoint-based collation.
"""
def __init__(self, locale=None, encoding=None):
+ super(Collator, self).__init__(locale, encoding)
dummy, self.encoding = collate._locale.getpair(locale, encoding)
self.locale = "C"
-
- def key(self, string):
- """Sort key for a string.
-
- If string is a str instance, it is first decoded according to
- the 'encoding' attribute of the Collator.
- """
- if isinstance(string, str):
- string = string.decode(self.encoding, 'replace')
- return string