New submission from Andrew Dalke:

The reference manual documentation for raw string literals says

"""Note also that a single backslash followed by a newline is
interpreted as those two characters as part of the string, *not* as a line
continuation."""

This is not the observed behavior.

>>> s = """ABC\
... 123"""
>>> s
'ABC123'
>>> 

Line continuations are ignored by triple quoted strings.



In addition, the reference manual documentation for "\x" escapes says

| ``\xhh``        | Character with hex value *hh*   | (4,5) |

where footnote (4) stays

   Unlike in Standard C, at most two hex digits are accepted.

However, the implementation requires exactly two hex digits:

>>> "\x41"
'A'
>>> "\x4."
ValueError: invalid \x escape
>>> "\x4" 
ValueError: invalid \x escape
>>>

----------
components: Documentation
messages: 61484
nosy: dalke
severity: minor
status: open
title: string literal documentation differs from implementation
versions: Python 2.5

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1889>
__________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to