[docs] [BUG REPORT 2.7.10] ValueError: invalid \x escape
zachary.ware+pydocs at gmail.com
Fri Sep 11 17:49:35 CEST 2015
On Wed, Sep 9, 2015 at 2:08 AM, Guillaume ALLARD
<allardguillaume at orange.fr> wrote:
> Python 2.7.10, Windows 7
> "ValueError: invalid \x escape"
> Note that there is no indication of where is the error (no line number).
> the faulty ligne is a # commented line inside a """ commented block.
> . . .
> #s.send("PRIVMSG bot :!voice %s\x\n" % n)
> . . .
> changing "\x" to "\x12" (for example) fixes the error.
This is not a bug. Triple-quoted strings are strings, not comments,
and the '#' character in a string is just a '#', not a comment marker.
Also, for future reference, this is not the correct list for reporting
bugs (other than documentation bugs); see bugs.python.org for the
Python bug tracker.
Hope this helps,
More information about the docs