New submission from Ram Rachum <r...@rachum.com>:
Today I was tripped up by an inconsistency in the `re` docstring. I wanted to use DOTALL as a flag inside my regex, rather than as an argument to the `compile` function. Here are two lines from the docstring: (?aiLmsux) Set the A, I, L, M, S, U, or X flag for the RE (see below). ... S DOTALL "." matches any character at all, including the newline. The DOTALL flag appears as an uppercase S in 2 places, and as a lowercase s in one place. This is confusing, and I initially tried using the uppercase S only to get an error. I'm attaching a PR to this ticket. ---------- components: Library (Lib) messages: 364617 nosy: cool-RR priority: normal severity: normal status: open title: Clarify flag case in `re` module type: behavior versions: Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue40016> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com