Class list of a module
Laurent.LAFFONT-ST at adixen.fr
Laurent.LAFFONT-ST at adixen.fr
Mon Jan 15 05:52:19 EST 2007
More information about the Python-list mailing list
Mon Jan 15 05:52:19 EST 2007
- Previous message (by thread): Mail System Error - Returned Mail
- Next message (by thread): Class list of a module
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> Looks rather simple to me... Anyway, you could avoid calling getattr > twice, if you iterate over vars(aModule).itervalues() > def getClassList(aModule): > return [cls for cls in vars(aModule).itervalues() > if inspect.isclass(cls)] > (And note that there is no need for using \ at the line ends, because > of the []) That's what I've been looking for. Thank you. Regards, Laurent Laffont
- Previous message (by thread): Mail System Error - Returned Mail
- Next message (by thread): Class list of a module
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list