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: islapha method returns True when the word is japanese
Type: behavior Stage: resolved
Components: Unicode Versions: Python 3.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: eric.smith, ezio.melotti, shaw_koike, vstinner, xtreak
Priority: normal Keywords:

Created on 2020-03-25 14:09 by shaw_koike, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (4)
msg364988 - (view) Author: shaw_koike (shaw_koike) * Date: 2020-03-25 14:09
When I use isalpha method with Japanese, I got it True whenever.

For example,

```
>>> "あいう".isalpha()
True
```

Is it the correct behavior?

Thanks for readning.
msg364989 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2020-03-25 14:24
From the documentation: https://docs.python.org/3/library/stdtypes.html#str.isalpha

Alphabetic characters are those characters defined in the Unicode character database as “Letter”, i.e., those with general category property being one of “Lm”, “Lt”, “Lu”, “Ll”, or “Lo”.

I'm assuming those characters all have these properties.
msg364990 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2020-03-25 14:27
That last line should have been "I'm assuming those characters all have one of these properties."

I'm going to close this issue. If you still think there's a bug here, you can let us know why and reopen this issue.
msg364991 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2020-03-25 14:46
unicodedata.category can be used here I guess to validate this.

>>> [unicodedata.category(c) for c in "あいう"]
['Lo', 'Lo', 'Lo']
History
Date User Action Args
2022-04-11 14:59:28adminsetgithub: 84243
2020-03-25 14:46:30xtreaksetnosy: + xtreak
messages: + msg364991
2020-03-25 14:27:25eric.smithsetstatus: open -> closed
resolution: not a bug
messages: + msg364990

stage: resolved
2020-03-25 14:24:34eric.smithsetnosy: + eric.smith
messages: + msg364989
2020-03-25 14:09:34shaw_koikecreate