Re: [Mesa-dev] [PATCH 14/26] python: Better get character ordinals

2018-07-05 Thread Eric Engestrom
On Thursday, 2018-07-05 15:17:45 +0200, Mathieu Bridon wrote: > In Python 2, iterating over a byte-string yields single-byte strings, > and we can pass them to ord() to get the corresponding integer. > > In Python 3, iterating over a byte-string directly yields those > integers. > > Transforming

[Mesa-dev] [PATCH 14/26] python: Better get character ordinals

2018-07-05 Thread Mathieu Bridon
In Python 2, iterating over a byte-string yields single-byte strings, and we can pass them to ord() to get the corresponding integer. In Python 3, iterating over a byte-string directly yields those integers. Transforming the byte string into a bytearray gives us a list of the integers correspondi