This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

作者 barry
收信人 barry, docs@python
日期 2012-01-09.13:34:21
SpamBayes Score 0.00038839184
Marked as misclassified
Message-id <1326116062.09.0.84789277908.issue13744@psf.upfronthosting.co.za>
In-reply-to
内容
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'.
历史
日期 用户 动作 参数
2012-01-09 13:34:22barry修改recipients: + barry, docs@python
2012-01-09 13:34:22barry修改messageid: <1326116062.09.0.84789277908.issue13744@psf.upfronthosting.co.za>
2012-01-09 13:34:21barry链接issue13744 messages
2012-01-09 13:34:21barry创建