def case_sensitive_collator():
 global _case_sensitive_collator
 if (_case_sensitive_collator is None):
  _case_sensitive_collator = collator().clone()
  _case_sensitive_collator.numeric = sort_collator().numeric
  _case_sensitive_collator.upper_first = True
 return _case_sensitive_collator

def case_sensitive_collator ( ) : global _case_sensitive_collator if ( _case_sensitive_collator is None ) : _case_sensitive_collator = collator ( ) . clone ( ) _case_sensitive_collator . numeric = sort_collator ( ) . numeric _case_sensitive_collator . upper_first = True return _case_sensitive_collator
always sorts upper case letter before lower case .