this line:
globals()[name] = type( name, (KWItem,), {} ) # nifty :)
where 'KWItem' was a class. It did seem nifty, but it was unclear to me
what was happening.
I went to python.org's online documentation which said that type()
takes one argument. So I fired up python:
type(42) <type 'int'> type("x", (type(42),), {})
<class '__main__.x'>
OK, It appears that type() with 3 arguments constructs a class. Is this
documented somewhere? If not can someone explain what is going on?
james