dynamic
François Pinard
pinard at iro.umontreal.ca
Wed Jun 15 10:32:20 EDT 2005
[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
More information about the Python-list
mailing list