A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2011-August/112930.html below:

[Python-Dev] memoryview: "B", "c", "b" format specifiers

[Python-Dev] memoryview: "B", "c", "b" format specifiers [Python-Dev] memoryview: "B", "c", "b" format specifiersStefan Krah stefan at bytereef.org
Thu Aug 18 22:25:59 CEST 2011
Antoine Pitrou <solipsis at pitrou.net> wrote:
> (I personnaly think the general bytes-as-sequence-of-ints behaviour is
> a mistake, so I wouldn't care much about an additional C API to enforce
> that behaviour :-))

I don't want to abolish the "c" (bytes of length 1) format. :)

I think there are use cases for well defined arrays of small signed/unsigned
integers. Say you want to send a log-ngram array of unsigned chars over the
network. There shouldn't be a bytes object involved in that process. You
would pack the array with ints and unpack as ints.

Unless the struct module and PEP-3118 grow support for int8_t and uint8_t,
I think "b" and "B" should probably be restricted to integers.


Stefan Krah



More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4