Callable modules?

Paul Rubin phr-n2002b at NOSPAMnightsong.com
Wed Jul 31 03:17:23 EDT 2002


Pekka Pessi <Pekka.Pessi at nokia.com> writes:
> 	If you want to call the __call__ attribute, that is a
> 	no-brainer, too:
> 
> >>> class module(types.ModuleType):
> ...   def __call__(self, *x, **kw):

The problem then is how to make the import statement create this new
class of module instead of the regular kind.



More information about the Python-list mailing list