[Michele Simionato] > Having a class that returns instances of some other class is horrible, > [...] don't do it!
Unusual, granted. Horrible, why? I found useful, sometimes, (ab)using Python syntax for representing data having more or less complex structure. More than once, it spared me the trouble of inventing a syntax, and then writing a lexer and a parser. Letting class constructors returning arbitrary objects has often been useful in such circumstances. -- François Pinard http://pinard.progiciels-bpi.ca -- http://mail.python.org/mailman/listinfo/python-list