New submission from Barry A. Warsaw <ba...@python.org>:

The lexical analysis documentation says this:

http://docs.python.org/py3k/reference/lexical_analysis.html?highlight=raw%20bytes

"Bytes literals are always prefixed with 'b' or 'B';..."

"Both string and bytes literals may optionally be prefixed with a letter 'r' or 
'R';..."

But that would lead you to believe that to get raw byte strings you should use 
rb"foo".  In fact, that's a SyntaxError in Python 2.6+ and Python 3.  What 
*does* work though is br"foo".

Either Python should accept both spellings (harder) or the documentation should 
make it clear that the 'b' must preceded the 'r'.

----------
assignee: docs@python
components: Documentation
messages: 150936
nosy: barry, docs@python
priority: normal
severity: normal
status: open
title: raw byte strings are described in a confusing way
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue13744>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to