[issue44175] What does "cased" and "uncased" mean?
New submission from Isaac Ge <otakutyrant@gmail.com>: 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". ---------- assignee: docs@python components: Documentation messages: 393920 nosy: docs@python, otakutyrant priority: normal severity: normal status: open title: What does "cased" and "uncased" mean? versions: Python 3.9 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue44175> _______________________________________
Change by Isaac Ge <otakutyrant@gmail.com>: ---------- title: What does "cased" and "uncased" mean? -> What do "cased" and "uncased" mean? _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue44175> _______________________________________
Josh Rosenberg <shadowranger+python@gmail.com> added the comment: "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? ---------- nosy: +josh.r _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue44175> _______________________________________
Isaac Ge <otakutyrant@gmail.com> added the comment: Why does "a".istitle() return "False" while it is not followed by any uncased character? ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue44175> _______________________________________
Josh Rosenberg <shadowranger+python@gmail.com> added the comment: 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 ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue44175> _______________________________________
Raymond Hettinger <raymond.hettinger@gmail.com> added the comment: FWIW, the current terminology is confusing to me as well. ---------- nosy: +rhettinger _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue44175> _______________________________________
Isaac Ge <otakutyrant@gmail.com> added the comment: @ 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. ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue44175> _______________________________________
Isaac Ge <otakutyrant@gmail.com> added the comment: 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()". ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue44175> _______________________________________
Change by Andrei Kulakov <andrei.avk@gmail.com>: ---------- keywords: +patch nosy: +andrei.avk nosy_count: 4.0 -> 5.0 pull_requests: +25440 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26865 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue44175> _______________________________________
Andrei Kulakov <andrei.avk@gmail.com> added the comment: 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. ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue44175> _______________________________________
participants (4)
-
Andrei Kulakov
-
Isaac Ge
-
Josh Rosenberg
-
Raymond Hettinger