Issue 13748: Allow rb"" literals as an equivalent to br"" (original) (raw)

Created on 2012-01-09 19:14 by pitrou, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
rb.patch pitrou,2012-01-09 19:14 review
rb2.patch pitrou,2012-01-09 19:27 review
Messages (8)
msg150964 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012-01-09 19:14
As mentioned in , it is not easy to remember that br"" is an allowed bytes literal but not rb"". Here is a patch to allow both forms.
msg150967 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012-01-09 19:27
Updated patch with doc.
msg150974 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2012-01-09 20:09
On Jan 09, 2012, at 07:27 PM, Antoine Pitrou wrote: >Updated patch with doc. Nicely done. +1
msg150978 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2012-01-09 20:53
I would be happier if there was precedent for this with "ur" = "ru" in 2.x, which is not true.
msg150979 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012-01-09 20:57
> I would be happier if there was precedent for this with "ur" = "ru" in > 2.x, which is not true. In my experience, raw unicode literals were very rare while raw bytes literals are quite frequent (mainly for regular expressions).
msg151038 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2012-01-11 08:01
+1 for "raw bytes", which reads much nicer to me than "bytes raw".
msg151153 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-01-12 21:47
New changeset bbed36370b08 by Antoine Pitrou in branch 'default': Issue #13748: Raw bytes literals can now be written with the `rb` prefix as well as `br`. http://hg.python.org/cpython/rev/bbed36370b08
msg151154 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012-01-12 21:48
Committed, thanks.
History
Date User Action Args
2022-04-11 14:57:25 admin set github: 57957
2012-01-12 21:48:47 pitrou set status: open -> closedresolution: fixedmessages: + stage: patch review -> commit review
2012-01-12 21:47:54 python-dev set nosy: + python-devmessages: +
2012-01-11 08:01:02 georg.brandl set nosy: + georg.brandlmessages: +
2012-01-09 20:57:49 pitrou set messages: +
2012-01-09 20:53:34 benjamin.peterson set messages: +
2012-01-09 20:09:40 barry set messages: +
2012-01-09 19:27:37 pitrou set files: + rb2.patchmessages: +
2012-01-09 19:14:10 pitrou create