Class optimization at runtime

Peter Otten __peter__ at web.de
Tue Aug 3 23:46:32 CEST 2004


Jeff Shannon wrote:

> Or even better:
> 
>     if option:
>         import WithOption as FooModule
>     else:
>         import WithoutOption as FooModule
> 
>     x = FooModule.Foo( )
> 
> (I twitch every time I see 'from X import *' ...)
 
That, and mixed-case module names -- and no, I'm not advertising
all-uppercase here...

Peter





More information about the Python-list mailing list