Message150936
| Author |
barry |
| Recipients |
barry, docs@python |
| Date |
2012年01月09日.13:34:21 |
| SpamBayes Score |
0.00038839184 |
| 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:22 | barry | set | recipients:
+ barry, docs@python |
| 2012年01月09日 13:34:22 | barry | set | messageid: <1326116062.09.0.84789277908.issue13744@psf.upfronthosting.co.za> |
| 2012年01月09日 13:34:21 | barry | link | issue13744 messages |
| 2012年01月09日 13:34:21 | barry | create |
|