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.

classification
Title: Document bytes alias for 2.7
Type: enhancement Stage: needs patch
Components: Documentation Versions: Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: christian.heimes, docs@python, flox, georg.brandl, terry.reedy
Priority: normal Keywords: patch

Created on 2008-01-18 16:23 by christian.heimes, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
trunk_bytes.patch christian.heimes, 2008-01-18 16:23
Messages (7)
msg60099 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2008-01-18 16:23
As discussed on the ml. It adds a bytes builtin and syntax for b"" and br"".
msg60104 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2008-01-18 18:10
Looks like you forgot tokenize.py

Make sure none of this gets merged into 3.0!
msg60106 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2008-01-18 18:25
Applied in r60052. I'll run a svnmerge now and exclude the revision from
the merge.
msg97953 - (view) Author: Florent Xicluna (flox) * (Python committer) Date: 2010-01-17 16:16
IMHO, this feature should be documented.
msg109825 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2010-07-10 06:46
Still not in 2.7: 2.4.1. String literals
include not in the grammar section.
msg116963 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2010-09-20 19:21
Changing title to match current issue status.

DOC PATCH

Grammar section: As near as I can tell, the alternatives for 

stringprefix    ::=  "r" | "u" | "ur" | "R" | "U" | "UR" | "Ur" | "uR"

should simply be augmented with

                     | "b" | "B" | "br" | "Br" | "bR" | "BR"

(on a separate line, indented as indicated).

Text section: At the end of the second paragraph, *replace*

"The two prefix characters may be combined; in this case, 'u' must appear before 'r'."

with

"A prefix of 'b' or 'B' is ignored in Python2; it indicates that the literal should become a bytes object in Python 3. A 'u' or 'b' prefix may be followed (but not preceded) by an 'r' prefix."
msg117367 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-09-25 13:46
Fixed in r85010.
History
Date User Action Args
2022-04-11 14:56:29adminsetgithub: 46173
2010-09-25 13:46:52georg.brandlsetstatus: open -> closed
resolution: fixed
messages: + msg117367
2010-09-20 19:21:01terry.reedysettitle: Bytes alias for 2.6 -> Document bytes alias for 2.7
nosy: georg.brandl, terry.reedy, christian.heimes, flox, docs@python
messages: + msg116963

components: - Interpreter Core
resolution: fixed -> (no value)
2010-09-20 15:06:05gvanrossumsetnosy: - gvanrossum
2010-09-20 07:45:08BreamoreBoysetassignee: georg.brandl -> docs@python

nosy: + docs@python
2010-08-07 18:35:37terry.reedysetversions: - Python 2.6
2010-07-10 06:46:19terry.reedysetnosy: + terry.reedy

messages: + msg109825
stage: needs patch
2010-01-17 16:16:46floxsetstatus: closed -> open

assignee: georg.brandl
components: + Documentation
versions: + Python 2.7
nosy: + georg.brandl, flox

messages: + msg97953
2008-01-18 18:25:18christian.heimessetstatus: open -> closed
resolution: fixed
messages: + msg60106
2008-01-18 18:10:05gvanrossumsetnosy: + gvanrossum
messages: + msg60104
2008-01-18 16:23:31christian.heimescreate