Antoine Pitrou <solip...@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



_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to