c enum - how to do this in python?

Erik Max Francis max at alcyone.com
Sat Feb 22 23:16:51 CET 2003

Grant Edwards wrote:

> And here the standard defines the size of "char" to be exactly 1 byte.

Indeed.  There's really never a point where the Standard says "a char is
a byte," but it makes it clear by implication over and over againt
throughout the text.  This is easily seen by just search for all
instances of the word "byte."

> OTOH, I've worked on machines where a byte wasn't 8 bits...

Right.  The C Standard guarantees that a byte will be at least 8 bits. 
But it could be more.  In fact, on some embedded system, char, short,
int, and long are all the same size (say, 32 bits).  That's completely
compliant with the Standard; the Standard only puts lower limits on the
size of its fundamental types.

 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/  \ The quality, not the longevity, of one's life is what is important.
\__/ Dr. Martin Luther King, Jr.
    Bosskey.net: Return to Wolfenstein / http://www.bosskey.net/rtcw/
 A personal guide to Return to Castle Wolfenstein.

More information about the Python-list mailing list