[Tutor] Not sure how to phrase this question

Magnus Lycka magnus at thinkware.se
Tue Sep 17 10:53:48 CEST 2002

At 18:55 2002-09-16 -0400, Arthur wrote:
>Would hate to have to resort to truely understanding
>this stuff to get to where I am hoping to get.


Don't you think it would be simpler to make a
factory function, instead of trying to mess
with the constructors?

def returnClassic... rather than
class returnClassic...

The interface would look just the same, and I
think implementation would be trivial.

What you are doing now certainly seems to defy
the intentions of __new__, since what you are
returning is not in the inheritence chain of the

If my channeling is successful, you are neither
doing what Guido intended, nor what the Gang of
4 intended with the Factory patterns.

Magnus Lyckå, Thinkware AB
Älvans väg 99, SE-907 50 UMEÅ
tel: 070-582 80 65, fax: 070-612 80 65
http://www.thinkware.se/  mailto:magnus at thinkware.se

More information about the Python-list mailing list