return an object of a different class

Steven D'Aprano steve+comp.lang.python at
Wed Feb 16 08:24:18 EST 2011

On Tue, 15 Feb 2011 22:17:13 -0700, spam wrote:

> I didn't explain my problem, chose a terrible example. This is more what
> I'm trying to do:
[snip "thingy" class]

No, your first example was better. This one is terrible -- it's so 
generic it's meaningless. 

In any case, you don't explain why it has to be a class, rather than a 
factory function.


More information about the Python-list mailing list