On 01/10/12 10:49, Roy Smith wrote:
The docs for re.VERBOSE say, "Whitespace within the pattern is
ignored, except when [...] preceded by an unescaped
backslash".  It's unclear exactly what that means.  If my
pattern is:

<backslash><space><space>

is the second space considered to be preceded by a backslash,
and thus taken literally, or does the backslash only apply to
the first<space>?  I suspect the latter, but it's somewhat
ambiguous.

You're right (easily testable) in your suspicions that the second space is ignored in this case. I suppose the documentation could be tweaked to read "immediately preceded".

-tkc




--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to