News for hackers. Stuff that matters.
Re:Show HN: Textcase: A Python Library for Text Case Conversion by zvr on Wednesday April 02, 2025 @03:50AM (#43554503)
Nice work, but since it does not handle anything else than strings, maybe it should be named "stringcase" or something.
Re:Show HN: Textcase: A Python Library for Text Case Conversion by zobweyt on Wednesday April 02, 2025 @03:59AM (#43554547)
Thank you for the feedback!

I appreciate your suggestion regarding the name, but unfortunately this name was already taken, so "textcase" was chosen.

I also have ideas for adding dictionary key conversion and other features in the future that will handle more than just strings. In addition, you can use this library to convert cases of Iterable[str] using textcase.pattern

Re:Show HN: Textcase: A Python Library for Text Case Conversion by zvr on Wednesday April 02, 2025 @07:25AM (#43555576)
My issue with using "text" is that I assume that a text like "I THINK I DO" should be converted to "I think I do", not "i think i do".

And that's just in English...

If "text" is in Greek, like "Καλημέρα", the upper form should be "ΚΑΛΗΜΕΡΑ", not a juxtaposition of upper() conversions of each letter.

Re:Show HN: Textcase: A Python Library for Text Case Conversion by zobweyt on Wednesday April 02, 2025 @07:33AM (#43555617)
Thanks for the clarification!

Yeah, there is such a problem with the naming "text" suggests something different than just a "string".

I guess handling these nuances falls under the broader categories of internationalization (i18n) and localization (l10n).