Jeremy Hylton : weblog : 2003-04-14

Metaclass for struct-like classes

Monday, April 14, 2003

I just noticed a reference to Alex Martelli's MetaBunch class. It looks like a useful helper, and would make a good addition to Demo/newmetaclasses/.

The point is: if you use a lot of "struct-like" classes, metaMetaBunch offers you a nice and convenient way to define them, with clean syntax and reasonable default semantics (__init__ and __repr__).