Author tchrist
Recipients Rhamphoryncus, amaury.forgeotdarc, belopolsky, doerwalter, eric.smith, ezio.melotti, georg.brandl, lemburg, loewis, pitrou, rhettinger, stutzbach, tchrist, vstinner
Date 2011-08-16.12:24:09
SpamBayes Score 1.72085e-14
Marked as misclassified No
Message-id <29086.1313497441@chthon>
In-reply-to <>
Marc-Andre Lemburg <> wrote
   on Tue, 16 Aug 2011 12:11:22 -0000: 

> The reasoning behind e.g. "ISSURROGATE" is that those names originate
> from and are consistent with the already existing ISLOWER/ISUPPER/ISTITLE
> macros which in return stem from the C APIs of the same names
> (see unicodeobject.h for reference).

I eventually figured that part out in the larger context.  
Makes sense looked at that way.

> Regarding low/high vs. lead/trail: The Unicode database uses the terms
> low/high and we do in Python as well, so let's stick with those.

Yes, those are their block assignments,  Block=High_Surrogates and Block=Low_Surrogates.
I just thought I should mention that in the time since those were invented (which cannot
be changed), after using them in real code for some years, their lingo seems to have 
evolved away from those initial names and toward lead/trail as less confusing.

> What I don't understand is why those macros should be declared
> private to Python (with the leading underscore). They are quite
> useful for extensions implementing codecs or other transformations
> as well.

I was wondering about that myself.  Beyond there being a lot fewer of those
private macros in the Python *.h files, they also seem to be of rather different
character than the iswhatever() macros:

    $ perl -nle '/^\s*#\s*define\s+(_Py_[\p{Lu}_]+)\b/ and print $1' *.h | sort -dfu | fmt -160

> BTW: I think the other issues mentioned in the discussion are more
> important to get right, than the names of those macros.

Yup.  Just paint it red. :)

Date User Action Args
2011-08-16 12:24:10tchristsetrecipients: + tchrist, lemburg, loewis, doerwalter, georg.brandl, rhettinger, amaury.forgeotdarc, belopolsky, Rhamphoryncus, pitrou, vstinner, eric.smith, stutzbach, ezio.melotti
2011-08-16 12:24:10tchristlinkissue10542 messages
2011-08-16 12:24:09tchristcreate