Andrew Kuchling wrote:
On Thu, Jun 01, 2000 at 06:36:29PM -0400, Eric S. Raymond wrote:
There has been a vast and echoing silence about the ascii.py module I posted here at Fred Drake's request. Is it really such a bad idea?
One misgiving I had was locales; is it a bug or a feature that locales aren't supported, as they are for the C isdigit(), isalpha(), &c, functions? I'm not entirely sure which it is. (The locale module doesn't expose the C is*() functions, though I think they're used in constructing string.letters.)
FYI, both strings and Unicode object already have a few .isXXX() methods: isdigit(), islower(), isspace(), istitle(), isupper() For strings these use the C APIs (which are locale aware), for Unicode the built in mappings are used. BTW, I haven't looked at the docs lately, but are the string and Unicode methods already documented ? All of them have doc-strings, so it should be easy extracting the data to build a TeX-file. On the topic of adding ascii.py, I'm +0 -- I don't currently have a need for it, but writing .append(ascii.CR + ascii.LF) does add to the readability of scripts. -- Marc-Andre Lemburg ______________________________________________________________________ Business: http://www.lemburg.com/ Python Pages: http://www.lemburg.com/python/