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/2012-October/122506.html below:

[Python-Dev] Sign of bytes

[Python-Dev] Sign of bytes [Python-Dev] Sign of bytesAmaury Forgeot d'Arc amauryfa at gmail.com
Wed Oct 31 21:45:50 CET 2012
2012/10/31 anatoly techtonik <techtonik at gmail.com>:
> I wonder why Python uses signed chars for bytes
> http://docs.python.org/2/library/ctypes.html#ctypes.c_byte

c_int is signed, c_uint is unsigned.
similarly c_byte is signed, and c_ubyte is unsigned.

> Windows implements BYTE as unsigned char, and it is in the same line as
> WORD, DWORD etc. The way you look at memory contents in assembly.

In this case you should use ctypes.wintypes.BYTE
... which is unfortunately defined as c_byte!
This is the bug :-(

-- 
Amaury Forgeot d'Arc
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