This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: What do "cased" and "uncased" mean?
Type: Stage: patch review
Components: Documentation Versions: Python 3.9
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: andrei.avk, docs@python, josh.r, otakutyrant, rhettinger
Priority: normal Keywords: patch

Created on 2021-05-19 03:45 by otakutyrant, last changed 2022-04-11 14:59 by admin.

Pull Requests
URL Status Linked Edit
PR 26865 open andrei.avk, 2021-06-23 02:47
Messages (8)
msg393920 - (view) Author: Isaac Ge (otakutyrant) Date: 2021-05-19 03:45
str.istitle(): Return True if the string is a titlecased string and there is at least one character, for example uppercase characters may only follow uncased characters and lowercase characters only cased ones. Return False otherwise.

I saw this description from the doc. But what does "cased" andd "uncased" mean? I looked it up on a dictionary, and the latter only says: "cased in something: completely covered with a particular material".

I think "cased" may be "capitalized", but, if so, the usage of the former is not endorsed by dictionaries so that I think this word is confusing or informal. so does "uncased".
msg393921 - (view) Author: Josh Rosenberg (josh.r) * (Python triager) Date: 2021-05-19 03:55
"Cased": Characters which are either lowercase or uppercase (they have some other equivalent form in a different case)

"Uncased": Characters which are neither uppercase nor lowercase.

Do you have a suggested alternate wording?
msg393954 - (view) Author: Isaac Ge (otakutyrant) Date: 2021-05-19 13:32
Why does "a".istitle() return "False" while it is not followed by any uncased character?
msg393983 - (view) Author: Josh Rosenberg (josh.r) * (Python triager) Date: 2021-05-19 22:55
See the docs for the title method on what they mean by "titlecased"; "a" is self-evidently not titlecased. https://docs.python.org/3/library/stdtypes.html#str.title
msg393989 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2021-05-20 00:04
FWIW, the current terminology is confusing to me as well.
msg394098 - (view) Author: Isaac Ge (otakutyrant) Date: 2021-05-21 08:47
@ Josh Rosenberg Sorry, I mistook "follow" as "be followed by". Thanks to your explication, the document is coherent. I admit that I cannot conjure up any better altnernative.

I noticed that "cased character" are explained via the footnote: https://docs.python.org/3/library/stdtypes.html?highlight=istitle#id6

So it may be better to add a footnote for "uncased characters" as well, like ones in "str.istitle()" and "str.upper()".

By the way, the footnote for "cased character" is a bit confusing because of the curt abbreviations "Lu", "Ll", and "Lt". I did not get these until I fount out they are related to general category of unicode, so we could add a related link pointing to a related Unicode document.
msg394099 - (view) Author: Isaac Ge (otakutyrant) Date: 2021-05-21 08:54
Or we could integrate the explanation of uncased characters into the footnote for cased characters, and append the footnote in "str.istitle()" and "str.upper()".
msg396378 - (view) Author: Andrei Kulakov (andrei.avk) * (Python triager) Date: 2021-06-23 02:50
I've put up a PR that adds a footnote, clarifies 'uncased' meaning and also adds notes in regard to discrepancy between standard publishing definition of "title case" and what we use in the four title-related methods.
History
Date User Action Args
2022-04-11 14:59:45adminsetgithub: 88341
2021-06-23 02:50:12andrei.avksetmessages: + msg396378
2021-06-23 02:47:14andrei.avksetkeywords: + patch
nosy: + andrei.avk

pull_requests: + pull_request25440
stage: patch review
2021-05-21 08:54:17otakutyrantsetmessages: + msg394099
2021-05-21 08:47:49otakutyrantsetmessages: + msg394098
2021-05-20 00:04:51rhettingersetnosy: + rhettinger
messages: + msg393989
2021-05-19 22:55:34josh.rsetmessages: + msg393983
2021-05-19 13:32:02otakutyrantsetmessages: + msg393954
2021-05-19 03:55:04josh.rsetnosy: + josh.r
messages: + msg393921
2021-05-19 03:46:05otakutyrantsettitle: What does "cased" and "uncased" mean? -> What do "cased" and "uncased" mean?
2021-05-19 03:45:40otakutyrantcreate