schizophrenic view of what is white space
Jean-Paul Calderone
exarkun at divmod.com
Thu Dec 4 17:27:55 EST 2008
On Thu, 04 Dec 2008 22:40:46 +0100, Hrvoje Niksic <hniksic at xemacs.org> wrote:
> [snip]
>
>Whitespace is probably not controversial, but many parsers tend to
>expect things like \d to match [0-9], not any Unicode character marked
>as "digit". For example, I'm not sure if this behavior would be a
>good default:
>
>>>> re.match(r'\d', u'\u0660', re.UNICODE)
><_sre.SRE_Match object at 0xb7da0250>
>
>What digit is \u0660, out of 0-9? Hard to say.
Why's it hard? int(u'\u0660') == 0 :)
Jean-Paul
More information about the Python-list
mailing list