Robert Feldt <feldt / ce.chalmers.se> writes: > Yes, that's a solution. IMHO, it's not very "beautiful" since you need to > duplicate code and I thought there might be a simpler way... (Now I > suspect you'll tell me thta I should be pragmatic and write a code > generator? :-)) Nope: But in reality, what code is duplicated? There's the two lines def setup/end, and the framework around the class. It really seems fairly minimal, particular as a nonpolymorphic equivalent would have some kind of conditional statement which itself had duplicated code (a test and some scaffolding). So, in this case, I'd give the multiple-class approach a Pragmatic Seal of Approval. Regards Dave