Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#21651 closed New feature (fixed)

Remove unused function: django.utils.text.recapitalize

Reported by: Vajrasky Kok Owned by: nobody
Component: Utilities Version: dev
Severity: Normal Keywords:
Cc: sky.kok@… Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

>>> from django.utils.text import recapitalize
>>> recapitalize("first sentence. second sentence? third sentence! FINAL SENTENCE.")
'First sentence. Second sentence? Third sentence! Final sentence.'

All is well, but... maybe not.

>>> recapitalize("first sentence.   second sentence?\nthird sentence!")
'First sentence.   second sentence?\nthird sentence!'

Change History (3)

comment:1 by Vajrasky Kok, 11 years ago

Cc: sky.kok@… added

Here is the PR to make recapitalize smarter and more useful. https://github.com/django/django/pull/2100

comment:2 by Marc Tamlyn <marc.tamlyn@…>, 11 years ago

Resolution: fixed
Status: newclosed

In b4a11f2720fbbb47f7c03a5a00b3cfb334266a92:

Fixed #21651 -- Remove recapitalize.

It was not used inside Django, is not tested or documented. Consequently
remove without deprecation path.

Thanks to @vajrasky for bringing it to our attention.

comment:3 by Tim Graham, 11 years ago

Summary: django.utils.text.recapitalize is too dumb (can not handle more than one space, newlines, and tabs)Remove unused function: django.utils.text.recapitalize
Note: See TracTickets for help on using tickets.
Back to Top