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.

Author Padmanabhan.Tr
Recipients Padmanabhan.Tr, steven.daprano
Date 2015-07-06.11:21:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <919550441.1411491.1436181678222.JavaMail.yahoo@mail.yahoo.com>
In-reply-to <1435855840.11.0.842083565747.issue24551@psf.upfronthosting.co.za>
Content
Dear Mr Steven D'ApranoThanks for your prompt response.I guess that 'b'\x00\x00 0' is the same as b'\x00\x00\x20\x30' if we take (space) as 20 & 0 as 30 as with ASCII / UTF-8 representation.  But if I go by 'Python Library Reference -Release version 3.4.2 (Section 4.4.2) ' there is no room for ASCII / UTF-8 representation here.  Direct byte conversion is used.Please confirm whether I am right.RegardsPadmanabhan

     On Thursday, July 2, 2015 10:20 PM, Steven D'Aprano <report@bugs.python.org> wrote:

Steven D'Aprano added the comment:

I don't know, what *is* the problem? What behaviour did you expect? The code sample you show seems to be working exactly as it is supposed to.

b'\x00\x00 0' is the same as b'\x00\x00\x20\x30', and that is the same as b'\x20\x30' with NUL padding on the left. Written as integers, that is like 0x00002030 == 0x2030 == 8240.

I don't think this demonstrates a bug or problem. If you still believe it does, please re-open the issue with a detailed description of what behaviour you expected and why you think this is a bug.

----------
nosy: +steven.daprano
resolution:  -> not a bug
status: open -> closed

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue24551>
_______________________________________
History
Date User Action Args
2015-07-06 11:21:25Padmanabhan.Trsetrecipients: + Padmanabhan.Tr, steven.daprano
2015-07-06 11:21:24Padmanabhan.Trlinkissue24551 messages
2015-07-06 11:21:23Padmanabhan.Trcreate