re.UNICODE and re.LOCALE

Martin v. Löwis martin at v.loewis.de
Mon Oct 13 01:26:49 EDT 2003


janeaustine50 at hotmail.com (Jane Austine) writes:

> Is turning both re.UNICODE _and_ re.LOCALE flags on valid in Python
> 2.3? Doesn't it conflict each other? What is the semantics?
> 
> Playing with \w and \b with both the flags on, it seemed re.UNICODE is
> ignored.

Right. The flags do conflict, and re.LOCALE is checked first,
resulting in re.UNICODE being ignored.

Regards,
Martin




More information about the Python-list mailing list