re.UNICODE and re.LOCALE

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jane Austine

    re.UNICODE and re.LOCALE

    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.
  • Martin v. Löwis

    #2
    Re: re.UNICODE and re.LOCALE

    janeaustine50@h otmail.com (Jane Austine) writes:
    [color=blue]
    > 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.[/color]

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

    Regards,
    Martin

    Comment

    Working...