Author barry
Recipients barry, docs@python
Date 2012-01-09.13:34:21
SpamBayes Score 0.000388392
Marked as misclassified No
Message-id <1326116062.09.0.84789277908.issue13744@psf.upfronthosting.co.za>
In-reply-to
Content
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'.
History
Date User Action Args
2012-01-09 13:34:22barrysetrecipients: + barry, docs@python
2012-01-09 13:34:22barrysetmessageid: <1326116062.09.0.84789277908.issue13744@psf.upfronthosting.co.za>
2012-01-09 13:34:21barrylinkissue13744 messages
2012-01-09 13:34:21barrycreate