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: Add isxxx() methods to string objects
Type: Stage:
Components: Interpreter Core Versions: Python 2.4
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: rhettinger Nosy List: gvanrossum, lemburg, loewis, rhettinger
Priority: normal Keywords: patch

Created on 2002-05-30 18:00 by rhettinger, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
isxxx.diff rhettinger, 2002-05-30 18:00 Patch to stringobject.c
Messages (7)
msg40192 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2002-05-30 18:00
Here's the patch for the isxxx methods.  If it's up to 
spec, let me know and I'll add documentation and 
expand the unittests.
msg40193 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2002-05-30 18:41
Logged In: YES 
user_id=6380

Thanks!

But what about adding the same methods to Unicode objects? I
think that's the point of using methods -- supporting the
same operations for both string types.

Also, Paul Prescod wanted ishexdigit instead of isxdigit.
Not sure if I agree.
msg40194 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2002-06-30 19:58
Logged In: YES 
user_id=80475

Unassigning this because I'm away for five weeks.

The equivalent Unicode operations are not as clearly 
defined as they are for Ascii. Was researching what is done 
in other programming languages.

Also, there was a py-dev discussion that suggested that 
the function names be changed to something more clear 
than their names in C.
msg40195 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-10-07 21:46
Logged In: YES 
user_id=21627

Raymond, any news on this? I like the idea.
msg40196 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2002-10-20 21:12
Logged In: YES 
user_id=80475

This one is taking a while because I'm not entirely clear on 
the inclusion/exclusion criteria for classifying Unicode 
characters for the various isxxx methods.

I'm spending some time with the big Unicode 3.0 book 
and will post a patch when I know how to proceed.  If any 
one already has a clear sense of direction, I'm all ears.
msg40197 - (view) Author: Marc-Andre Lemburg (lemburg) * (Python committer) Date: 2002-10-20 22:20
Logged In: YES 
user_id=38388

I'd suggest to start with the standard ASCII characters for
the methods
you are suggesting to add and then complete the sets using the
various categories listed on

http://www.unicode.org/Public/UNIDATA/UnicodeData.html

e.g. punctation (P*) is a general category in the Unicode
database,
control too (Cc). Visibility and printability depend on
available
fonts, so I'm not sure what to do about these. Hex chars are
the same as for 8-bit strings.
msg40198 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2003-10-31 13:56
Logged In: YES 
user_id=21627

Patch #825313, which is identical to this one, was just
rejected, so it is probably time to reject this as well.
History
Date User Action Args
2022-04-10 16:05:22adminsetgithub: 36670
2002-05-30 18:00:38rhettingercreate