unicode strings and such

Garth Grimm garth_grimm at hp.com
Thu Sep 13 18:05:37 EDT 2001


Thanks for the bug catch.  Our test cases for this code seem to have been so focused on the 
international character issues that we failed to check the upper/lower case.

Garth

Marc Christiansen wrote:

> Garth Grimm <garth_grimm at hp.com> wrote:
> 
> One thing apparently nobody noticed until now, this line
> 
>>     patternRegex = re.compile(pattern,re.UNICODE or re.IGNORECASE)
>>
> 
> should probably read
>      patternRegex = re.compile(pattern,re.UNICODE | re.IGNORECASE)
> (or use '+' instead of '|', in this case it doesn't matter).
> 'or' is the logical or, not the binary (or however it is called).
> To see the difference, do a
> 
> print re.UNICODE, re.IGNORECASE
> print re.UNICODE or re.IGNORECASE, re.UNICODE | re.IGNORECASE
> 
> from the python prompt.
> 
> HTH
>   Marc
> 




More information about the Python-list mailing list