[issue27949] Fix description in bytes literal doc

New submission from Xiang Zhang: This sentence "bytes with a numeric value of 128 or greater must be expressed with escapes" is wrong and not complete. The value needs to be escaped is >= 127 and < 32. ---------- assignee: docs@python components: Documentation files: lexical_bytes_literal.patch keywords: patch messages: 274297 nosy: docs@python, xiang.zhang priority: normal severity: normal status: open title: Fix description in bytes literal doc type: enhancement versions: Python 3.6 Added file: http://bugs.python.org/file44354/lexical_bytes_literal.patch _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue27949> _______________________________________

Eric V. Smith added the comment: While they probably should be entered with escapes, there's no actual technical requirement for that.
From the command line, I can enter a control-A with control-V control-A (this might be different depending on your environment, or if you use an editor). This will enter a literal string containing a single character with value 1.
That gives:
---------- nosy: +eric.smith _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue27949> _______________________________________

Xiang Zhang added the comment: Ooh, sorry. It seems I misunderstand the meaning of the sentence. I understand the value as the output of repr, I mean b'\x01'. It means how it's created. Thanks for your reply and sorry for the noise. I close this then. ---------- resolution: -> not a bug status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue27949> _______________________________________

Eric V. Smith added the comment: No problem! Thanks for caring enough to open an issue and submit a patch, even if we don't use it. ---------- stage: -> resolved _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue27949> _______________________________________

Eric V. Smith added the comment: While they probably should be entered with escapes, there's no actual technical requirement for that.
From the command line, I can enter a control-A with control-V control-A (this might be different depending on your environment, or if you use an editor). This will enter a literal string containing a single character with value 1.
That gives:
---------- nosy: +eric.smith _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue27949> _______________________________________

Xiang Zhang added the comment: Ooh, sorry. It seems I misunderstand the meaning of the sentence. I understand the value as the output of repr, I mean b'\x01'. It means how it's created. Thanks for your reply and sorry for the noise. I close this then. ---------- resolution: -> not a bug status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue27949> _______________________________________

Eric V. Smith added the comment: No problem! Thanks for caring enough to open an issue and submit a patch, even if we don't use it. ---------- stage: -> resolved _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue27949> _______________________________________
participants (2)
-
Eric V. Smith
-
Xiang Zhang