On Mon, Jun 3, 2013 at 5:25 AM, Mok-Kong Shen <mok-kong.s...@t-online.de> wrote: > b'7' is the byte with the character 7 in a certain code, so that's > ok. In other PLs one assigns an int to a byte, with that int in either > decimal notation or hexadecimal notation, or else one assigns a > character to it, in which case it gets the value of the character > in a certain code. What I don't yet understand is why Python is > apprently different from other PLs in that point in not allowing direct > coersion of a byte to an int.
It does. Just subscript it: >>> b'7'[0] 55 ChrisA -- http://mail.python.org/mailman/listinfo/python-list