__all__ = ( 'title', ) def title(value): """ Improved implementation of str.title(); retains all existing uppercase letters. """ return ' '.join([w[0].upper() + w[1:] for w in str(value).split()])