How to implement a union (C data type) in Python?

chads lamote1 at netscape.net
Mon Mar 8 10:53:59 EST 2004


How would one implement a union (C data type) in Python, given this
simple example?

union {
   struct {
      int size;
      float time;
   } var1;
   struct {
      char initial;
      float time;
   } var2;
};



More information about the Python-list mailing list