-
- 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