Newbie Class Questions

Joe Mason joe at notcharles.ca
Sun Mar 28 06:49:51 EST 2004


In article <c46dp1$6be$05$1 at news.t-online.com>, Peter Otten wrote:
> Ed Suominen wrote:
> 
>> I think it would be cool for my "AutoText" class (see below, hereby GPL'd)
>> to be able to tell what subclasses inherit from it and instantiate objects
>> for all of those subclasses to implement a "AutoAll" function.. Any ideas?

Actually, somebody pointed out in the other thread that Python has a
__subclasses__ function, so AutoAll can just do "for i in
AutoText.__subclasses__:".

Joe



More information about the Python-list mailing list