[docs] [issue10587] Document the meaning of str methods

Alexander Belopolsky report at bugs.python.org
Tue Nov 30 06:46:46 CET 2010


New submission from Alexander Belopolsky <belopolsky at users.sourceforge.net>:

On Mon, Nov 29, 2010 at 4:13 PM, "Martin v. Löwis" <martin at v.loewis.de> wrote:
>> - How specific should library reference manual be in defining methods
>> affected by UCD such as str.upper()?
>
> It should specify what this actually does in Unicode terminology
> (probably in addition to a layman's rephrase of that)
>

http://mail.python.org/pipermail/python-dev/2010-November/106155.html

Some of the clarifications may actually lead to a conclusion that current behavior is wrong.  For example, Unicode defines Alphabetic property as Lu + Ll + Lt + Lm + Lo + Nl + Other_Alphabetic

http://www.unicode.org/reports/tr44/tr44-6.html#Alphabetic

However, str.isalpha() is defined as just Lu + Ll + Lt + Lm + Lo.  For example,

>>> import unicodedata as ud
>>> ud.category('Ⅴ')
'Nl'
>>> 'Ⅴ'.isalpha()
False
>>> ud.name('Ⅴ')
'ROMAN NUMERAL FIVE'

As far a I can tell, the source of Other_Alphabetic property data,
http://unicode.org/Public/UNIDATA/PropList.txt, is not even included in the unicodedata module and neither is SpecialCasing.txt which is necessary for implementing a compliant case mapping algorithm.

----------
assignee: docs at python
components: Documentation
messages: 122885
nosy: belopolsky, docs at python
priority: normal
severity: normal
status: open
title: Document the meaning of str methods
versions: Python 3.2

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10587>
_______________________________________


More information about the docs mailing list