[Python-3000] sizeof(size_t) < sizeof(long)
"Martin v. Löwis"
martin at v.loewis.de
Wed Apr 16 08:15:02 CEST 2008
>> and the C standard says that sizeof(char) == 1 byte.
>
> Does it actually use the word byte, or does it just say the
> "smallest addressable unit of memory" or something?
>
> Seems to me it can't have it both ways, without also trying
> to define the meaning of "byte", which I don't think it has
> any business doing.
3.6 byte
addressable unit of data storage large enough to hold any
member of the basic character set of the execution
environment
6.5.3.4 The sizeof operator
[#2] The sizeof operator yields the size (in bytes) of its
operand, which may be an expression or the parenthesized
name of a type. The size is determined from the type of the
operand. [...]
[#3] When applied to an operand that has type char, unsigned
char, or signed char, (or a qualified version thereof) the
result is 1. [...]
Regards,
Martin
More information about the Python-3000
mailing list