On 2012-10-31, at 18:44 , anatoly techtonik wrote: > I wonder why Python uses signed chars for bytes > http://docs.python.org/2/library/ctypes.html#ctypes.c_byte
That's not Python, that's ctypes. struct[0] has no "bytes" it uses "char" for everything. If I had to guess, it would be because "char" is already an unsigned char in ctypes, "signed_char" is way too long, "schar" looks like dog vomit and there was no point in aliasing "byte" to "char. Which left "byte" free for "signed char". [0] http://docs.python.org/2/library/struct.html#format-characters _______________________________________________ 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